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

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

Issue 6717018: Introduce accessors on builtins instance (Closed) Base URL: https://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
Index: src/ia32/builtins-ia32.cc
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc
index cb416460746e0ebd381e339a4406468f54523905..13ed8b5a258ee1c6ca25d47a1c4b8fb160e84961 100644
--- a/src/ia32/builtins-ia32.cc
+++ b/src/ia32/builtins-ia32.cc
@@ -100,8 +100,9 @@ void Builtins::Generate_JSConstructCall(MacroAssembler* masm) {
// Set expected number of arguments to zero (not changing eax).
__ Set(ebx, Immediate(0));
__ GetBuiltinEntry(edx, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR);
- __ jmp(Handle<Code>(masm->isolate()->builtins()->builtin(
- ArgumentsAdaptorTrampoline)), RelocInfo::CODE_TARGET);
+ Handle<Code> arguments_adaptor =
+ builtin(ArgumentsAdaptorTrampoline, masm->isolate());
+ __ jmp(arguments_adaptor, RelocInfo::CODE_TARGET);
}
@@ -334,8 +335,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// Call the function.
if (is_api_function) {
__ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
- Handle<Code> code = Handle<Code>(
- masm->isolate()->builtins()->builtin(Builtins::HandleApiCallConstruct));
+ Handle<Code> code =
+ Builtins::builtin(Builtins::HandleApiCallConstruct, masm->isolate());
ParameterCount expected(0);
__ InvokeCode(code, expected, expected,
RelocInfo::CODE_TARGET, CALL_FUNCTION);
@@ -436,8 +437,8 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
// Invoke the code.
if (is_construct) {
- __ call(Handle<Code>(masm->isolate()->builtins()->builtin(
- Builtins::JSConstructCall)), RelocInfo::CODE_TARGET);
+ __ call(Builtins::builtin(Builtins::JSConstructCall, masm->isolate()),
+ RelocInfo::CODE_TARGET);
} else {
ParameterCount actual(eax);
__ InvokeFunction(edi, actual, CALL_FUNCTION);
@@ -674,8 +675,8 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
__ j(not_zero, &function, taken);
__ Set(ebx, Immediate(0));
__ GetBuiltinEntry(edx, Builtins::CALL_NON_FUNCTION);
- __ jmp(Handle<Code>(masm->isolate()->builtins()->builtin(
- ArgumentsAdaptorTrampoline)), RelocInfo::CODE_TARGET);
+ __ jmp(builtin(ArgumentsAdaptorTrampoline, masm->isolate()),
+ RelocInfo::CODE_TARGET);
__ bind(&function);
}
@@ -688,8 +689,7 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
__ mov(edx, FieldOperand(edi, JSFunction::kCodeEntryOffset));
__ SmiUntag(ebx);
__ cmp(eax, Operand(ebx));
- __ j(not_equal, Handle<Code>(masm->isolate()->builtins()->builtin(
- ArgumentsAdaptorTrampoline)));
+ __ j(not_equal, builtin(ArgumentsAdaptorTrampoline, masm->isolate()));
ParameterCount expected(0);
__ InvokeCode(Operand(edx), expected, expected, JUMP_FUNCTION);
@@ -796,8 +796,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
__ mov(edx, Operand(ebp, 2 * kPointerSize)); // load arguments
// Use inline caching to speed up access to arguments.
- Handle<Code> ic(masm->isolate()->builtins()->builtin(
- Builtins::KeyedLoadIC_Initialize));
+ Handle<Code> ic = builtin(KeyedLoadIC_Initialize, masm->isolate());
__ call(ic, RelocInfo::CODE_TARGET);
// It is important that we do not have a test instruction after the
// call. A test instruction after the call is used to indicate that
@@ -1234,8 +1233,7 @@ void Builtins::Generate_ArrayCode(MacroAssembler* masm) {
// Jump to the generic array code in case the specialized code cannot handle
// the construction.
__ bind(&generic_array_code);
- Code* code = masm->isolate()->builtins()->builtin(Builtins::ArrayCodeGeneric);
- Handle<Code> array_code(code);
+ Handle<Code> array_code = builtin(ArrayCodeGeneric, masm->isolate());
__ jmp(array_code, RelocInfo::CODE_TARGET);
}
@@ -1268,9 +1266,8 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) {
// Jump to the generic construct code in case the specialized code cannot
// handle the construction.
__ bind(&generic_constructor);
- Code* code = masm->isolate()->builtins()->builtin(
- Builtins::JSConstructStubGeneric);
- Handle<Code> generic_construct_stub(code);
+ Handle<Code> generic_construct_stub =
+ Builtins::builtin(JSConstructStubGeneric, masm->isolate());
__ jmp(generic_construct_stub, RelocInfo::CODE_TARGET);
}
@@ -1586,7 +1583,7 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
#undef __
-
-} } // namespace v8::internal
+}
+} // namespace v8::internal
#endif // V8_TARGET_ARCH_IA32
« src/builtins.cc ('K') | « src/builtins.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698