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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 209353006: Refactor optimized in hydrogen only runtime functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Patch for landing + rebase Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3342 matching lines...) Expand 10 before | Expand all | Expand 10 after
3353 // 0 (literal string): The type of logging (corresponds to the flags). 3353 // 0 (literal string): The type of logging (corresponds to the flags).
3354 // This is used to determine whether or not to generate the log call. 3354 // This is used to determine whether or not to generate the log call.
3355 // 1 (string): Format string. Access the string at argument index 2 3355 // 1 (string): Format string. Access the string at argument index 2
3356 // with '%2s' (see Logger::LogRuntime for all the formats). 3356 // with '%2s' (see Logger::LogRuntime for all the formats).
3357 // 2 (array): Arguments to the format string. 3357 // 2 (array): Arguments to the format string.
3358 ZoneList<Expression*>* args = expr->arguments(); 3358 ZoneList<Expression*>* args = expr->arguments();
3359 ASSERT_EQ(args->length(), 3); 3359 ASSERT_EQ(args->length(), 3);
3360 if (CodeGenerator::ShouldGenerateLog(isolate(), args->at(0))) { 3360 if (CodeGenerator::ShouldGenerateLog(isolate(), args->at(0))) {
3361 VisitForStackValue(args->at(1)); 3361 VisitForStackValue(args->at(1));
3362 VisitForStackValue(args->at(2)); 3362 VisitForStackValue(args->at(2));
3363 __ CallRuntime(Runtime::kLog, 2); 3363 __ CallRuntime(Runtime::kHiddenLog, 2);
3364 } 3364 }
3365 // Finally, we're expected to leave a value on the top of the stack. 3365 // Finally, we're expected to leave a value on the top of the stack.
3366 __ mov(eax, isolate()->factory()->undefined_value()); 3366 __ mov(eax, isolate()->factory()->undefined_value());
3367 context()->Plug(eax); 3367 context()->Plug(eax);
3368 } 3368 }
3369 3369
3370 3370
3371 void FullCodeGenerator::EmitSubString(CallRuntime* expr) { 3371 void FullCodeGenerator::EmitSubString(CallRuntime* expr) {
3372 // Load the arguments on the stack and call the stub. 3372 // Load the arguments on the stack and call the stub.
3373 SubStringStub stub; 3373 SubStringStub stub;
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
3828 __ cmp(key, FixedArrayElementOperand(cache, tmp)); 3828 __ cmp(key, FixedArrayElementOperand(cache, tmp));
3829 __ j(not_equal, &not_found); 3829 __ j(not_equal, &not_found);
3830 3830
3831 __ mov(eax, FixedArrayElementOperand(cache, tmp, 1)); 3831 __ mov(eax, FixedArrayElementOperand(cache, tmp, 1));
3832 __ jmp(&done); 3832 __ jmp(&done);
3833 3833
3834 __ bind(&not_found); 3834 __ bind(&not_found);
3835 // Call runtime to perform the lookup. 3835 // Call runtime to perform the lookup.
3836 __ push(cache); 3836 __ push(cache);
3837 __ push(key); 3837 __ push(key);
3838 __ CallRuntime(Runtime::kGetFromCache, 2); 3838 __ CallRuntime(Runtime::kHiddenGetFromCache, 2);
3839 3839
3840 __ bind(&done); 3840 __ bind(&done);
3841 context()->Plug(eax); 3841 context()->Plug(eax);
3842 } 3842 }
3843 3843
3844 3844
3845 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { 3845 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) {
3846 ZoneList<Expression*>* args = expr->arguments(); 3846 ZoneList<Expression*>* args = expr->arguments();
3847 ASSERT(args->length() == 1); 3847 ASSERT(args->length() == 1);
3848 3848
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
4138 __ mov(eax, result_operand); 4138 __ mov(eax, result_operand);
4139 // Drop temp values from the stack, and restore context register. 4139 // Drop temp values from the stack, and restore context register.
4140 __ add(esp, Immediate(3 * kPointerSize)); 4140 __ add(esp, Immediate(3 * kPointerSize));
4141 4141
4142 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 4142 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
4143 context()->Plug(eax); 4143 context()->Plug(eax);
4144 } 4144 }
4145 4145
4146 4146
4147 void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) { 4147 void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
4148 Handle<String> name = expr->name(); 4148 if (expr->function() != NULL &&
4149 if (name->length() > 0 && name->Get(0) == '_') { 4149 expr->function()->intrinsic_type == Runtime::INLINE) {
4150 Comment cmnt(masm_, "[ InlineRuntimeCall"); 4150 Comment cmnt(masm_, "[ InlineRuntimeCall");
4151 EmitInlineRuntimeCall(expr); 4151 EmitInlineRuntimeCall(expr);
4152 return; 4152 return;
4153 } 4153 }
4154 4154
4155 Comment cmnt(masm_, "[ CallRuntime"); 4155 Comment cmnt(masm_, "[ CallRuntime");
4156 ZoneList<Expression*>* args = expr->arguments(); 4156 ZoneList<Expression*>* args = expr->arguments();
4157 4157
4158 if (expr->is_jsruntime()) { 4158 if (expr->is_jsruntime()) {
4159 // Push the builtins object as receiver. 4159 // Push the builtins object as receiver.
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
4936 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4936 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4937 Assembler::target_address_at(call_target_address, 4937 Assembler::target_address_at(call_target_address,
4938 unoptimized_code)); 4938 unoptimized_code));
4939 return OSR_AFTER_STACK_CHECK; 4939 return OSR_AFTER_STACK_CHECK;
4940 } 4940 }
4941 4941
4942 4942
4943 } } // namespace v8::internal 4943 } } // namespace v8::internal
4944 4944
4945 #endif // V8_TARGET_ARCH_IA32 4945 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698