Commit Graph

243 Commits

Author SHA1 Message Date
rossberg@chromium.org
984d0b0925 Rename Context::global to Context::global_object,
in preparation for global lexical scope.

R=mstarzinger@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10832365

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 12:59:00 +00:00
rossberg@chromium.org
42552808ab Rename "global context" to "native context",
in anticipation of the upcoming lexical global scope.

Mostly automatised as:

for FILE in `egrep -ril "global[ _]?context" src test/cctest`
do
  echo $FILE
  sed "s/Global context/Native context/g" <$FILE >$FILE.0
  sed "s/global context/native context/g" <$FILE.0 >$FILE.1
  sed "s/global_context/native_context/g" <$FILE.1 >$FILE.2
  sed "s/GLOBAL_CONTEXT/NATIVE_CONTEXT/g" <$FILE.2 >$FILE.3
  sed "s/GlobalContext/NativeContext/g" <$FILE.3 >$FILE
  rm $FILE.[0-9]
done

R=mstarzinger@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10832342

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 09:03:08 +00:00
yangguo@chromium.org
b4cb3e28ca Fix Debug::Break crash.
BUG=131642
TEST=test-debug/Regress131642

Review URL: https://chromiumcodereview.appspot.com/10698123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-09 15:18:08 +00:00
yangguo@chromium.org
a2cfa9d3df Put additional information onto the stack when crashing in Debug::Break.
R=jkummerow@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10698116

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-06 09:34:59 +00:00
yangguo@chromium.org
dee15487f0 Larger stack trace string in the minidump when catching Debug::Break crash.
R=jkummerow@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10698103

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11986 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-05 08:07:01 +00:00
yangguo@chromium.org
7a201f599b Put even more debug information on stack when aborting.
R=jkummerow@chromium.org
BUG=131642
TEST=

Review URL: https://chromiumcodereview.appspot.com/10698048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-29 15:11:16 +00:00
peter.rybin@gmail.com
83973a0a2e Correctly support several consecutive stack modifications.
Review URL: https://chromiumcodereview.appspot.com/10637003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-22 20:50:03 +00:00
yangguo@chromium.org
16c775ea81 Actually put debug information on stack when aborting.
R=ulan@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10627015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-22 09:36:39 +00:00
sanjoy@chromium.org
9e4fbb45c1 One Zone per CompilationInfo.
The CompilationInfo record now saves a Zone, and the compiler pipeline
allocates memory from the Zone in the CompilationInfo.  Before
compiling a function, we create a Zone on the stack and save a pointer
to that Zone to the CompilationInfo; which then gets picked up and
allocated from.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10534139

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-20 08:58:41 +00:00
mstarzinger@chromium.org
a760b82cab Enable lazy compilation for non-trivial outer contexts.
This changes the compiler to be more aggressive about lazy compilation
of closures with non-trivial outer context. Compilation can only be
triggered with a valid outer context now. One exception is the debugger,
which can request compilation of arbitrary shared code, but it ensures
to trigger compilation only at points where no context is needed.

This relands r11782, r11783, r11790 and a minor fix.

R=ulan@chromium.org
TEST=mjsunit/debug-script-breakpoints-nested

Review URL: https://chromiumcodereview.appspot.com/10543141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 14:29:48 +00:00
jkummerow@chromium.org
b7700fb3cc Fix a bunch of implicit casts detected by the Win64 compiler
Review URL: https://chromiumcodereview.appspot.com/10536202

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 13:45:30 +00:00
yangguo@chromium.org
fb81da2e5f ARM: Fix literal pool handling for breakpoints in debugger.
BUG=2177
TEST=none

Review URL: https://chromiumcodereview.appspot.com/10449047
Patch from Martyn Capewell <m.m.capewell@googlemail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 11:16:47 +00:00
mstarzinger@chromium.org
9edaa1536b Revert r11782, r11783 and r11790 due to Webkit failures.
R=danno@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10536142

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-13 11:26:34 +00:00
mstarzinger@chromium.org
f78c124812 Fix failing assertion in r11782.
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10548004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11783 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-12 16:53:15 +00:00
mstarzinger@chromium.org
19ece2bec8 Enable lazy compilation for non-trivial outer contexts.
This changes the compiler to be more aggressive about lazy compilation
of closures with non-trivial outer context. Compilation can only be
triggered with a valid outer context now. One exception is the debugger,
which can request compilation of arbitrary shared code, but it ensures
to trigger compilation only at points where no context is needed.

R=ulan@chromium.org
TEST=mjsunit/debug-script-breakpoints-nested

Review URL: https://chromiumcodereview.appspot.com/10538102

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-12 15:57:50 +00:00
vegorov@chromium.org
75ca3e3395 Reimplement dynamic frame alignment for frames that are compiled via OSR or have more than 2 double spill slots.
The first spill slot is now reserved on all optimized frames to distinguish frames that were aligned.

Review URL: https://chromiumcodereview.appspot.com/10532066

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-12 10:22:33 +00:00
mstarzinger@chromium.org
5e8cc58b9f Fix CompileFullCodeForDebugging to compile closure.
This compiles against a given closure instead of the shared function
info, which is a prerequisite for enabling lazy compilation of inner
functions within a closure with non-trivial context.

R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10543026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-06 15:21:13 +00:00
yangguo@chromium.org
05c195bd96 Intercept a crash, put debug information onto the stack and then abort gracefully.
BUG=125128
TEST=

Review URL: https://chromiumcodereview.appspot.com/10375009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11516 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-04 13:20:41 +00:00
peter.rybin@gmail.com
1719a1499a Fix issue 825 (LiveEdit vs. function with no locals) in core and for ia32.
Review URL: https://chromiumcodereview.appspot.com/10263002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-03 17:31:34 +00:00
danno@chromium.org
d366275dd6 Fix stack overflow test failures with no snap.
R=mstarzinger@chromium.org
BUG=chromium:119429

Review URL: https://chromiumcodereview.appspot.com/9963108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-03 15:54:07 +00:00
danno@chromium.org
8dc9bc962f Don't crash on stack overflow entering the debugger.
R=ager@chromium.org, sgjesse@chromium.org
BUG=chromium:119429
TEST= test/mjsunit/regress/regress-119429.js

Review URL: https://chromiumcodereview.appspot.com/9965101

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-03 13:45:56 +00:00
jkummerow@chromium.org
d71c60e086 Port count-based profiler to x64
Review URL: https://chromiumcodereview.appspot.com/9845019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-27 11:21:27 +00:00
pfeldman@chromium.org
26aaa3b005 Debugger: naive implementation of "step into Function.prototype.bind".
Review URL: https://chromiumcodereview.appspot.com/9705018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-15 14:17:22 +00:00
jkummerow@chromium.org
a19c50afb4 Profiler experiments: Fix debugger in the presence of self-optimization headers
Review URL: https://chromiumcodereview.appspot.com/9466012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-27 07:49:14 +00:00
vegorov@chromium.org
a7b0481b6d Tweak compaction candidate selection to avoid keeping page with low occupancy around.
Increase slots buffer chain length to 15 to make compaction more aggressive and usefull.

Pass gc and collector selection reasons to GCTracer to allow more meaningull --gc-trace.

Print fragmentation of spaces that we do not compact.

R=erik.corry@gmail.com

Review URL: https://chromiumcodereview.appspot.com/9323007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-03 14:16:40 +00:00
mstarzinger@chromium.org
74feaa6c3d Fix and adapt debugger for new call target caches.
R=yangguo@chromium.org
TEST=mjsunit/debug-stepout-scope

Review URL: https://chromiumcodereview.appspot.com/9297019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-27 16:09:20 +00:00
vegorov@chromium.org
67d72eab45 When preparing heap for breakpoints make sure not to flush away non-optimized code for inlined functions.
Debug::PrepareForBreakPoints was not fully populating active_functions list.

R=erik.corry@gmail.com
TEST=test/mjsunit/regress/regress-debug-code-recompilation.js

Review URL: https://chromiumcodereview.appspot.com/9290013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 15:11:59 +00:00
erik.corry@gmail.com
48f239e087 Spellling mistakes.
Review URL: http://codereview.chromium.org/9123031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-16 09:46:21 +00:00
erik.corry@gmail.com
b3e0761e38 Cosmetic changes ("set up" is a verb, "setup" is a noun).
Review URL: http://codereview.chromium.org/9139051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-13 13:09:52 +00:00
ulan@chromium.org
746ef93362 Move handlified functions from handles.cc to objects.cc
BUG=
TEST=

Review URL: http://codereview.chromium.org/9008012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 17:16:19 +00:00
vegorov@chromium.org
068128dadd Fix GCC 4.7 warnings:
* src/debug.cc (Debug::SetBreakPoint): Compare value not pointer.

Review URL: http://codereview.chromium.org/8971002
Patch from Tobias Burnus <burnus@net-b.de>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10296 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-21 21:50:24 +00:00
sgjesse@chromium.org
32ee3c27c6 Handle possible difference between function code and activated code on preparation for break points
The full code activated for a function might not be the same code as
is currently the active full code for a function. There where some
asumptions in the debugger preparation for break points.

Unfortunately there is currently no regression test.

R=jkummerow@chromium.org

BUG=
TEST=

Review URL: http://codereview.chromium.org//8818010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 13:09:05 +00:00
sgjesse@chromium.org
5ccdb3b692 Fix handling of recompiling code for optimized and inlined functions
The debugger preparation did not take optimized functions - including
inlined function into account. This caused the full-code used for
deoptimization to be the "lazy compile" builtin which did not work and
caused V8 to crash.

R=yangguo@chromium.org

BUG=chromium:105375, v8:1782
TEST=test/mjsunit/debug-break-inline.js

Review URL: http://codereview.chromium.org//8728031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 11:48:35 +00:00
rossberg@chromium.org
f936aac43e Make _CallFunction proxy-aware.
Change calling convention for CallFunction stub.
Some fixes regarding strict mode call traps.

R=kmillikin@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/8318014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9916 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 14:39:37 +00:00
kmillikin@chromium.org
0df252b38b Handlify the remaining CallStubCompiler functions.
Also, handlify functions for loading with interceptors and callbacks.
Remove some unneeded code.  Rename Foreign::address() because it
confusingly shadows HeapObject::address() which does something quite
different.

R=vegorov@chromium.org,ulan@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/8391045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 12:37:29 +00:00
kmillikin@chromium.org
e3792a6830 Handlify the stub cache lookup and patching for CallIC and KeyedCallIC.
R=ulan@chromium.org,vegorov@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/8357010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 17:08:53 +00:00
kmillikin@chromium.org
838fc27766 Handlify the runtime lookup of CallIC and KeyedCallIC.
R=ulan@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/8345038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9701 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 12:04:16 +00:00
sgjesse@chromium.org
a58c963c67 Reapply "Support for precise stepping in functions compiled before debugging was started (step 2)"
This is reapplying r9501 with this single change which seemed to be causing most (all) of the failures for r9501.

--- a/src/debug.cc
+++ b/src/debug.cc
@@ -2230,6 +2230,7 @@ Debugger::Debugger(Isolate* isolate)
       compiling_natives_(false),
       is_loading_debugger_(false),
       never_unload_debugger_(false),
+      force_debugger_active_(true),
       message_handler_(NULL),
       debugger_unload_pending_(false),
       host_dispatch_handler_(NULL),

R=kmillikin@chromium.org

BUG=
TEST=

Review URL: http://codereview.chromium.org//8337009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9684 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 13:40:33 +00:00
fschneider@chromium.org
313f9505b4 Make accessors for oddball objects return Oddball* instead of Object*.
Fix a use of the hole value and the undefined value before initialization when
initializing V8. Before we just read a NULL value from them.
Review URL: http://codereview.chromium.org/8130002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 09:21:48 +00:00
kmillikin@chromium.org
1f12cc4099 Simplify calling generated code from the runtime.
Instead of expecting Object** arrays at the outermost level, expect
Handle<Object> arrays and reinterpret_cast them only just before invoking
the generated code.

R=rossberg@chromium.org,fschneider@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/8133020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9537 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-06 09:31:38 +00:00
kmillikin@chromium.org
ceee9d535a Remove #include "isolate-inl.h" from v8.h.
Include it only in the .cc files where it's needed.

R=fschneider@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/8117001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-03 11:13:20 +00:00
sgjesse@chromium.org
08a85de703 Revert "Support for precise stepping in functions compiled before debugging was started (step 2)"
TBR=kmillikin@chromium.org

BUG=
TEST=

Review URL: http://codereview.chromium.org//8101011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-01 08:47:12 +00:00
sgjesse@chromium.org
b2ebc91f5c Reapply "Support for precise stepping in functions compiled before debugging was started (step 2)"
This is to get a clean run in the buildbot.

TBR=kmillikin@chromium.org

BUG=
TEST=

Review URL: http://codereview.chromium.org//8098020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-01 05:39:14 +00:00
sgjesse@chromium.org
083275715a Revert "Support for precise stepping in functions compiled before debugging was started (step 2)"
This reverts commits r9499, r9497 and r9489.

Then changed caused a number of failures.

TBR=kmillikin@chromium.org

BUG=
TEST=

Review URL: http://codereview.chromium.org//8086020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 13:27:38 +00:00
sgjesse@chromium.org
230ee9de96 Try to fix Win64 build
TBR=kmillikin@chromium.org

BUG=
TEST=

Review URL: http://codereview.chromium.org//8085024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 13:06:31 +00:00
sgjesse@chromium.org
f274c94e65 Make sure heap is iteratable before iterating it.
This line was accidentally removed in r9489.

TBR=kmillikin@chromium.org

BUG=
TEST=

Review URL: http://codereview.chromium.org//8086018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9497 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 12:12:09 +00:00
sgjesse@chromium.org
de7b222e36 Support for precise stepping in functions compiled before debugging was started (step 2)
This change will ensure that full code with debug break slots is compiled and activated for all functions which already have activation frames.

This additional handling is only for functions which have activations on the stack, and that activation is of the full code compiled without debug break slots. In that case the full code is recompiled with debug break slots. It is ensured that the full code is compiled generating the exact same instructions - except for the additional debug break slots - as before. The return address on the stack is then patched to continue execution in the new code.

Also fixed SortedListBSearch to actually use the passed comparision function.

R=svenpanne@chromium.org, kmillikin@chromium.org

BUG=
TEST=

Review URL: http://codereview.chromium.org//8050010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 08:39:56 +00:00
rossberg@chromium.org
3df2602037 Handle function proxies as getters/setters.
R=kmillikin@chromium.org
BUG=v8:1543
TEST=

Review URL: http://codereview.chromium.org/7849021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 17:12:41 +00:00
vegorov@chromium.org
5b8a6c1e54 Make heap iterable in PrepareForBreakPoints.
When aborting incremental marking with compaction discard all slots collected on evacuation candidates.

R=ricow@chromium.org
BUG=v8:1700
TEST=inspector/debugger/debugger-step-in.html

Review URL: http://codereview.chromium.org/7977004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 11:20:05 +00:00
vegorov@chromium.org
ac36cb4504 Merge experimental/gc branch to the bleeding_edge.
Review URL: http://codereview.chromium.org/7945009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 18:36:47 +00:00