Commit Graph

272 Commits

Author SHA1 Message Date
peter.rybin@gmail.com
5dde44e431 Fix very strange bug in FindBreakLocationFromAddress algorithm
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/15737023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15014 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 16:48:22 +00:00
mstarzinger@chromium.org
f8db2414f2 Deprecate FACTORY helper macro.
This removes the FACTORY helper macro to avoid accidental TLS access
when using the factory. Most internal code has access to the Isolate by
now whereas tests which are not performance critical still heavily use
TLS access through explicit Isolate::Current() calls.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/16337005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14931 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 10:30:05 +00:00
yangguo@chromium.org
7f8a3d803c Make assertion scopes thread safe.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 15:32:22 +00:00
dcarney@chromium.org
595d0ea8b0 remove old MakeWeak
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/16160010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 08:17:04 +00:00
dcarney@chromium.org
0cf128390f deprecate WriteAscii and MayContainNonAscii
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/14638003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-03 06:47:24 +00:00
danno@chromium.org
d728493929 Allow setting debugger breakpoints on CompareNilICs
BUG=v8:2660
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/14106011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 07:56:09 +00:00
rossberg@chromium.org
3cd9f6a40e Add d8 functionality for switching between realms (a.k.a. contexts), 2nd try
The only difference to the previous implementation (https://codereview.chromium.org/14295011/) is in patch set 2.

R=yangguo@chromium.org
BUG=

Review URL: https://codereview.chromium.org/14404005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-22 11:29:52 +00:00
yangguo@chromium.org
72a05845ec Revert r14310 due to isolate tests failure.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14334 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-18 14:41:24 +00:00
rossberg@chromium.org
2458a801f7 Add d8 functionality for switching between realms (a.k.a. contexts)
R=mstarzinger@chromium.org,yangguo@chromium.org
BUG=

Review URL: https://codereview.chromium.org/14295011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14310 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-17 15:07:31 +00:00
jkummerow@chromium.org
586c4e74b6 Replace OS::MemCopy with OS::MemMove (just as fast but more flexible).
Review URL: https://codereview.chromium.org/13932006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14280 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 12:30:51 +00:00
mstarzinger@chromium.org
a22790bfed Change Context::New to not create persistent handles.
This moves the responsibility of putting a new context into a persistent
handle to the embedder. Also it removes one API function where the copy
constructor for persistent handles is needed.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/13799003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14203 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-10 09:34:37 +00:00
peter.rybin@gmail.com
f4374c0989 Fix isolate getter in DebugAgent
Review URL: https://codereview.chromium.org/12678015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-21 16:12:50 +00:00
svenpanne@chromium.org
e4e4447305 Pass Isolates explicitly in Deoptimizer-related code.
Removed a few ancient useless ASSERTs on the way. Reduced the number of train wrecks.

BUG=v8:2487

Review URL: https://codereview.chromium.org/12917002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-18 13:57:49 +00:00
svenpanne@chromium.org
53310ac152 Added a version of the v8::HandleScope constructor with an Isolate and use that consistently.
I tried to limit the use of v8::Isolate::GetCurrent() and v8::internal::Isolate::Current() as much as possible, but sometimes this would have involved restructuring tests quite a bit, which is better left for a separate CL.

BUG=v8:2487

Review URL: https://codereview.chromium.org/12716010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-15 12:06:53 +00:00
rossberg@chromium.org
55f93b5532 Renamed "symbols" to "internalized strings" throughout the code base,
in preparation of the introduction of ES6 'symbols' (aka private/unique names).

The SymbolTable became the StringTable. I also made sure to adapt all comments. The only remaining use of the term "symbol" (other than unrelated uses in the parser and such) is now 'NewSymbol' in the API and the 'V8.KeyedLoadGenericSymbol' counter, changing which might break embedders.

The one functional change in this CL is that I removed the former 'empty_string' constant, since it is redundant given the 'empty_symbol' constant that we also had (and both were used inconsistently).

R=yangguo@chromium.org
BUG=

Review URL: https://codereview.chromium.org/12210083

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 17:03:34 +00:00
svenpanne@chromium.org
fb6776e84a Made Isolate a mandatory parameter for everything Handle-related.
Unified parameter order of CreateHandle with the rest of v8 on the way. A few
Isolate::Current()s had to be introduced, which is not nice, and not every place
will win a beauty contest, but we can clean this up later easily in smaller steps.

Review URL: https://codereview.chromium.org/12300018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-25 14:46:09 +00:00
svenpanne@chromium.org
71a26c928a Make the Isolate parameter mandatory for internal HandleScopes.
Improved Frames and their iterators on the way, too.

BUG=v8:2487

Review URL: https://codereview.chromium.org/12254007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-15 09:27:10 +00:00
svenpanne@chromium.org
7b45ab9501 Don't use TLS for space iterators.
This is not only inherently slow, but it also forces the caller to enter an
Isolate before. Both is bad, so we have to do some heap plumbing.

BUG=v8:2531

Review URL: https://codereview.chromium.org/12217106

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-11 13:02:20 +00:00
svenpanne@chromium.org
52d10a68cb Add Isolate parameter to Persistent class.
BUG=v8:2487

Review URL: https://codereview.chromium.org/12033011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-25 08:31:46 +00:00
svenpanne@chromium.org
fab9a39d9d Make the Isolate parameter mandatory in Locker and Unlocker classes.
Note that leaving out the Isolate parameter previously had a very special
meaning, namely "use the *default* Isolate", i.e. the one magically created at
program initialization time. All other API entries use the meaning "current
Isolate", which is different in a multi-threaded setting and confusing.

Temporarily disabled deprecations until Chrome is ready.

BUG=v8:2487

Review URL: https://codereview.chromium.org/11970009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-18 07:20:17 +00:00
verwaest@chromium.org
7cb764b780 Combine DEBUG_BREAK and DEBUG_PREPARE_STEP_IN into one IC stub kind DEBUG_STUB, encoding DEBUG_BREAK and DEBUG_PREPARE_STEP_IN as extra ic state.
Review URL: https://chromiumcodereview.appspot.com/11821049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13352 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-10 14:15:12 +00:00
yangguo@chromium.org
19a6575ea3 Rename LookupSymbol calls to use Utf8 or OneByte in names.
R=yangguo@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11597007
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-17 15:56:16 +00:00
yangguo@chromium.org
79643009dd Fix null dereference after OOM.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-03 17:57:17 +00:00
danno@chromium.org
bd4e114b8e Add code again to allow reclaiming old unexecuted functions.
When code objects in the heap for FUNCTIONs and OPTIMIZED_FUNCTIONs are marked by the GC, their prologue is patched with a call to a stub that removes the patch. This allows the collector to quickly identify code objects that haven't been executed since the last full collection (they are the ones that sill contain the patch). The functionality is currently disabled, but can be activated by specifying the "--age-code".

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/10837037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 12:18:11 +00:00
danno@chromium.org
43e248d2e5 Use movw/movt instead of constant pool on ARMv7.
Some ARM architectures load 32-bit immediate constants more efficiently using movw/movt pairs rather than constant pool loads. This patch allows the assembler to generate one or the other load form at runtime depending on what is faster.

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/11037023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 12:21:42 +00:00
yangguo@chromium.org
cb72bf5735 Fix debugger's eval when close to stack overflow.
R=verwaest@chromium.org
BUG=v8:2318

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 13:40:32 +00:00
yangguo@chromium.org
bf229e93eb Enable/disable LiveEdit using the (C++) debug API.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-10 09:24:17 +00:00
mstarzinger@chromium.org
74aa15bfa0 Fix FindSharedFunctionInfoInScript to not optimize.
This prevents a corner case in FindSharedFunctionInfoInScript that would cause
functions to be optimized because an intermittent GC would clear the flag
indicating whether breakpoints are present. Above method was also moved into the
Debug class because it is only used by the debugger.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-03 14:23:00 +00:00
rossberg@chromium.org
1dbf670713 Index script compilation cache over context, too,
in preparation for global lexical scope.

R=ulan@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-28 10:49:23 +00:00
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