Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: src/arm/builtins-arm.cc

Issue 6685088: Merge isolates to bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/assembler-arm-inl.h ('k') | src/arm/codegen-arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/builtins-arm.cc
===================================================================
--- src/arm/builtins-arm.cc (revision 7267)
+++ src/arm/builtins-arm.cc (working copy)
@@ -325,7 +325,7 @@
r5,
JSArray::kPreallocatedArrayElements,
call_generic_code);
- __ IncrementCounter(&Counters::array_function_native, 1, r3, r4);
+ __ IncrementCounter(COUNTERS->array_function_native(), 1, r3, r4);
// Setup return value, remove receiver from stack and return.
__ mov(r0, r2);
__ add(sp, sp, Operand(kPointerSize));
@@ -361,7 +361,7 @@
r7,
true,
call_generic_code);
- __ IncrementCounter(&Counters::array_function_native, 1, r2, r4);
+ __ IncrementCounter(COUNTERS->array_function_native(), 1, r2, r4);
// Setup return value, remove receiver and argument from stack and return.
__ mov(r0, r3);
__ add(sp, sp, Operand(2 * kPointerSize));
@@ -385,7 +385,7 @@
r7,
false,
call_generic_code);
- __ IncrementCounter(&Counters::array_function_native, 1, r2, r6);
+ __ IncrementCounter(COUNTERS->array_function_native(), 1, r2, r6);
// Fill arguments as array elements. Copy from the top of the stack (last
// element) to the array backing store filling it backwards. Note:
@@ -442,7 +442,8 @@
// Jump to the generic array code if the specialized code cannot handle
// the construction.
__ bind(&generic_array_code);
- Code* code = Builtins::builtin(Builtins::ArrayCodeGeneric);
+ Code* code = Isolate::Current()->builtins()->builtin(
+ Builtins::ArrayCodeGeneric);
Handle<Code> array_code(code);
__ Jump(array_code, RelocInfo::CODE_TARGET);
}
@@ -474,7 +475,8 @@
// Jump to the generic construct code in case the specialized code cannot
// handle the construction.
__ bind(&generic_constructor);
- Code* code = Builtins::builtin(Builtins::JSConstructStubGeneric);
+ Code* code = Isolate::Current()->builtins()->builtin(
+ Builtins::JSConstructStubGeneric);
Handle<Code> generic_construct_stub(code);
__ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
}
@@ -488,7 +490,7 @@
// -- sp[(argc - n - 1) * 4] : arg[n] (zero based)
// -- sp[argc * 4] : receiver
// -----------------------------------
- __ IncrementCounter(&Counters::string_ctor_calls, 1, r2, r3);
+ __ IncrementCounter(COUNTERS->string_ctor_calls(), 1, r2, r3);
Register function = r1;
if (FLAG_debug_code) {
@@ -518,7 +520,7 @@
r5, // Scratch.
false, // Is it a Smi?
&not_cached);
- __ IncrementCounter(&Counters::string_ctor_cached_number, 1, r3, r4);
+ __ IncrementCounter(COUNTERS->string_ctor_cached_number(), 1, r3, r4);
__ bind(&argument_is_string);
// ----------- S t a t e -------------
@@ -572,13 +574,13 @@
__ tst(r3, Operand(kIsNotStringMask));
__ b(ne, &convert_argument);
__ mov(argument, r0);
- __ IncrementCounter(&Counters::string_ctor_conversions, 1, r3, r4);
+ __ IncrementCounter(COUNTERS->string_ctor_conversions(), 1, r3, r4);
__ b(&argument_is_string);
// Invoke the conversion builtin and put the result into r2.
__ bind(&convert_argument);
__ push(function); // Preserve the function.
- __ IncrementCounter(&Counters::string_ctor_conversions, 1, r3, r4);
+ __ IncrementCounter(COUNTERS->string_ctor_conversions(), 1, r3, r4);
__ EnterInternalFrame();
__ push(r0);
__ InvokeBuiltin(Builtins::TO_STRING, CALL_JS);
@@ -597,7 +599,7 @@
// At this point the argument is already a string. Call runtime to
// create a string wrapper.
__ bind(&gc_required);
- __ IncrementCounter(&Counters::string_ctor_gc_required, 1, r3, r4);
+ __ IncrementCounter(COUNTERS->string_ctor_gc_required(), 1, r3, r4);
__ EnterInternalFrame();
__ push(argument);
__ CallRuntime(Runtime::kNewStringWrapper, 1);
@@ -633,8 +635,8 @@
// Set expected number of arguments to zero (not changing r0).
__ mov(r2, Operand(0, RelocInfo::NONE));
__ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR);
- __ Jump(Handle<Code>(builtin(ArgumentsAdaptorTrampoline)),
- RelocInfo::CODE_TARGET);
+ __ Jump(Handle<Code>(Isolate::Current()->builtins()->builtin(
+ ArgumentsAdaptorTrampoline)), RelocInfo::CODE_TARGET);
}
@@ -906,7 +908,8 @@
if (is_api_function) {
__ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
Handle<Code> code = Handle<Code>(
- Builtins::builtin(Builtins::HandleApiCallConstruct));
+ Isolate::Current()->builtins()->builtin(
+ Builtins::HandleApiCallConstruct));
ParameterCount expected(0);
__ InvokeCode(code, expected, expected,
RelocInfo::CODE_TARGET, CALL_FUNCTION);
@@ -963,7 +966,7 @@
__ LeaveConstructFrame();
__ add(sp, sp, Operand(r1, LSL, kPointerSizeLog2 - 1));
__ add(sp, sp, Operand(kPointerSize));
- __ IncrementCounter(&Counters::constructed_objects, 1, r1, r2);
+ __ IncrementCounter(COUNTERS->constructed_objects(), 1, r1, r2);
__ Jump(lr);
}
@@ -1039,8 +1042,8 @@
// Invoke the code and pass argc as r0.
__ mov(r0, Operand(r3));
if (is_construct) {
- __ Call(Handle<Code>(Builtins::builtin(Builtins::JSConstructCall)),
- RelocInfo::CODE_TARGET);
+ __ Call(Handle<Code>(Isolate::Current()->builtins()->builtin(
+ Builtins::JSConstructCall)), RelocInfo::CODE_TARGET);
} else {
ParameterCount actual(r0);
__ InvokeFunction(r1, actual, CALL_FUNCTION);
@@ -1169,7 +1172,7 @@
void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
// Probe the CPU to set the supported features, because this builtin
// may be called before the initialization performs CPU setup.
- CpuFeatures::Probe(false);
+ Isolate::Current()->cpu_features()->Probe(false);
// Lookup the function in the JavaScript frame and push it as an
// argument to the on-stack replacement function.
@@ -1332,8 +1335,8 @@
// Expected number of arguments is 0 for CALL_NON_FUNCTION.
__ mov(r2, Operand(0, RelocInfo::NONE));
__ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION);
- __ Jump(Handle<Code>(builtin(ArgumentsAdaptorTrampoline)),
- RelocInfo::CODE_TARGET);
+ __ Jump(Handle<Code>(Isolate::Current()->builtins()->builtin(
+ ArgumentsAdaptorTrampoline)), RelocInfo::CODE_TARGET);
__ bind(&function);
}
@@ -1348,8 +1351,8 @@
__ mov(r2, Operand(r2, ASR, kSmiTagSize));
__ ldr(r3, FieldMemOperand(r1, JSFunction::kCodeEntryOffset));
__ cmp(r2, r0); // Check formal and actual parameter counts.
- __ Jump(Handle<Code>(builtin(ArgumentsAdaptorTrampoline)),
- RelocInfo::CODE_TARGET, ne);
+ __ Jump(Handle<Code>(Isolate::Current()->builtins()->builtin(
+ ArgumentsAdaptorTrampoline)), RelocInfo::CODE_TARGET, ne);
ParameterCount expected(0);
__ InvokeCode(r3, expected, expected, JUMP_FUNCTION);
« no previous file with comments | « src/arm/assembler-arm-inl.h ('k') | src/arm/codegen-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698