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

Side by Side Diff: src/arm/codegen-arm.cc

Issue 4760003: Move ComputeCallInitialize from the codegen.cc to stub-cache.cc. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 1 month 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/arm/codegen-arm.h ('k') | src/arm/full-codegen-arm.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 25 matching lines...) Expand all
36 #include "debug.h" 36 #include "debug.h"
37 #include "ic-inl.h" 37 #include "ic-inl.h"
38 #include "jsregexp.h" 38 #include "jsregexp.h"
39 #include "jump-target-light-inl.h" 39 #include "jump-target-light-inl.h"
40 #include "parser.h" 40 #include "parser.h"
41 #include "regexp-macro-assembler.h" 41 #include "regexp-macro-assembler.h"
42 #include "regexp-stack.h" 42 #include "regexp-stack.h"
43 #include "register-allocator-inl.h" 43 #include "register-allocator-inl.h"
44 #include "runtime.h" 44 #include "runtime.h"
45 #include "scopes.h" 45 #include "scopes.h"
46 #include "stub-cache.h"
46 #include "virtual-frame-inl.h" 47 #include "virtual-frame-inl.h"
47 #include "virtual-frame-arm-inl.h" 48 #include "virtual-frame-arm-inl.h"
48 49
49 namespace v8 { 50 namespace v8 {
50 namespace internal { 51 namespace internal {
51 52
52 53
53 #define __ ACCESS_MASM(masm_) 54 #define __ ACCESS_MASM(masm_)
54 55
55 // ------------------------------------------------------------------------- 56 // -------------------------------------------------------------------------
(...skipping 4169 matching lines...) Expand 10 before | Expand all | Expand 10 after
4225 // Load the arguments. 4226 // Load the arguments.
4226 int arg_count = args->length(); 4227 int arg_count = args->length();
4227 for (int i = 0; i < arg_count; i++) { 4228 for (int i = 0; i < arg_count; i++) {
4228 Load(args->at(i)); 4229 Load(args->at(i));
4229 } 4230 }
4230 4231
4231 VirtualFrame::SpilledScope spilled_scope(frame_); 4232 VirtualFrame::SpilledScope spilled_scope(frame_);
4232 // Setup the name register and call the IC initialization code. 4233 // Setup the name register and call the IC initialization code.
4233 __ mov(r2, Operand(var->name())); 4234 __ mov(r2, Operand(var->name()));
4234 InLoopFlag in_loop = loop_nesting() > 0 ? IN_LOOP : NOT_IN_LOOP; 4235 InLoopFlag in_loop = loop_nesting() > 0 ? IN_LOOP : NOT_IN_LOOP;
4235 Handle<Code> stub = ComputeCallInitialize(arg_count, in_loop); 4236 Handle<Code> stub = StubCache::ComputeCallInitialize(arg_count, in_loop);
4236 CodeForSourcePosition(node->position()); 4237 CodeForSourcePosition(node->position());
4237 frame_->CallCodeObject(stub, RelocInfo::CODE_TARGET_CONTEXT, 4238 frame_->CallCodeObject(stub, RelocInfo::CODE_TARGET_CONTEXT,
4238 arg_count + 1); 4239 arg_count + 1);
4239 __ ldr(cp, frame_->Context()); 4240 __ ldr(cp, frame_->Context());
4240 frame_->EmitPush(r0); 4241 frame_->EmitPush(r0);
4241 4242
4242 } else if (var != NULL && var->AsSlot() != NULL && 4243 } else if (var != NULL && var->AsSlot() != NULL &&
4243 var->AsSlot()->type() == Slot::LOOKUP) { 4244 var->AsSlot()->type() == Slot::LOOKUP) {
4244 // ---------------------------------- 4245 // ----------------------------------
4245 // JavaScript examples: 4246 // JavaScript examples:
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
4319 // Load the arguments. 4320 // Load the arguments.
4320 int arg_count = args->length(); 4321 int arg_count = args->length();
4321 for (int i = 0; i < arg_count; i++) { 4322 for (int i = 0; i < arg_count; i++) {
4322 Load(args->at(i)); 4323 Load(args->at(i));
4323 } 4324 }
4324 4325
4325 VirtualFrame::SpilledScope spilled_scope(frame_); 4326 VirtualFrame::SpilledScope spilled_scope(frame_);
4326 // Set the name register and call the IC initialization code. 4327 // Set the name register and call the IC initialization code.
4327 __ mov(r2, Operand(name)); 4328 __ mov(r2, Operand(name));
4328 InLoopFlag in_loop = loop_nesting() > 0 ? IN_LOOP : NOT_IN_LOOP; 4329 InLoopFlag in_loop = loop_nesting() > 0 ? IN_LOOP : NOT_IN_LOOP;
4329 Handle<Code> stub = ComputeCallInitialize(arg_count, in_loop); 4330 Handle<Code> stub =
4331 StubCache::ComputeCallInitialize(arg_count, in_loop);
4330 CodeForSourcePosition(node->position()); 4332 CodeForSourcePosition(node->position());
4331 frame_->CallCodeObject(stub, RelocInfo::CODE_TARGET, arg_count + 1); 4333 frame_->CallCodeObject(stub, RelocInfo::CODE_TARGET, arg_count + 1);
4332 __ ldr(cp, frame_->Context()); 4334 __ ldr(cp, frame_->Context());
4333 frame_->EmitPush(r0); 4335 frame_->EmitPush(r0);
4334 } 4336 }
4335 4337
4336 } else { 4338 } else {
4337 // ------------------------------------------- 4339 // -------------------------------------------
4338 // JavaScript example: 'array[index](1, 2, 3)' 4340 // JavaScript example: 'array[index](1, 2, 3)'
4339 // ------------------------------------------- 4341 // -------------------------------------------
(...skipping 14 matching lines...) Expand all
4354 for (int i = 0; i < arg_count; i++) { 4356 for (int i = 0; i < arg_count; i++) {
4355 Load(args->at(i)); 4357 Load(args->at(i));
4356 } 4358 }
4357 4359
4358 // Set the name register and call the IC initialization code. 4360 // Set the name register and call the IC initialization code.
4359 Load(property->key()); 4361 Load(property->key());
4360 frame_->SpillAll(); 4362 frame_->SpillAll();
4361 frame_->EmitPop(r2); // Function name. 4363 frame_->EmitPop(r2); // Function name.
4362 4364
4363 InLoopFlag in_loop = loop_nesting() > 0 ? IN_LOOP : NOT_IN_LOOP; 4365 InLoopFlag in_loop = loop_nesting() > 0 ? IN_LOOP : NOT_IN_LOOP;
4364 Handle<Code> stub = ComputeKeyedCallInitialize(arg_count, in_loop); 4366 Handle<Code> stub =
4367 StubCache::ComputeKeyedCallInitialize(arg_count, in_loop);
4365 CodeForSourcePosition(node->position()); 4368 CodeForSourcePosition(node->position());
4366 frame_->CallCodeObject(stub, RelocInfo::CODE_TARGET, arg_count + 1); 4369 frame_->CallCodeObject(stub, RelocInfo::CODE_TARGET, arg_count + 1);
4367 __ ldr(cp, frame_->Context()); 4370 __ ldr(cp, frame_->Context());
4368 frame_->EmitPush(r0); 4371 frame_->EmitPush(r0);
4369 } 4372 }
4370 } 4373 }
4371 4374
4372 } else { 4375 } else {
4373 // ---------------------------------- 4376 // ----------------------------------
4374 // JavaScript example: 'foo(1, 2, 3)' // foo is not global 4377 // JavaScript example: 'foo(1, 2, 3)' // foo is not global
(...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
5836 for (int i = 0; i < arg_count; i++) { 5839 for (int i = 0; i < arg_count; i++) {
5837 Load(args->at(i)); 5840 Load(args->at(i));
5838 } 5841 }
5839 5842
5840 VirtualFrame::SpilledScope spilled_scope(frame_); 5843 VirtualFrame::SpilledScope spilled_scope(frame_);
5841 5844
5842 if (function == NULL) { 5845 if (function == NULL) {
5843 // Call the JS runtime function. 5846 // Call the JS runtime function.
5844 __ mov(r2, Operand(node->name())); 5847 __ mov(r2, Operand(node->name()));
5845 InLoopFlag in_loop = loop_nesting() > 0 ? IN_LOOP : NOT_IN_LOOP; 5848 InLoopFlag in_loop = loop_nesting() > 0 ? IN_LOOP : NOT_IN_LOOP;
5846 Handle<Code> stub = ComputeCallInitialize(arg_count, in_loop); 5849 Handle<Code> stub = StubCache::ComputeCallInitialize(arg_count, in_loop);
5847 frame_->CallCodeObject(stub, RelocInfo::CODE_TARGET, arg_count + 1); 5850 frame_->CallCodeObject(stub, RelocInfo::CODE_TARGET, arg_count + 1);
5848 __ ldr(cp, frame_->Context()); 5851 __ ldr(cp, frame_->Context());
5849 frame_->EmitPush(r0); 5852 frame_->EmitPush(r0);
5850 } else { 5853 } else {
5851 // Call the C runtime function. 5854 // Call the C runtime function.
5852 frame_->CallRuntime(function, arg_count); 5855 frame_->CallRuntime(function, arg_count);
5853 frame_->EmitPush(r0); 5856 frame_->EmitPush(r0);
5854 } 5857 }
5855 ASSERT_EQ(original_height + 1, frame_->height()); 5858 ASSERT_EQ(original_height + 1, frame_->height());
5856 } 5859 }
(...skipping 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after
7256 BinaryOpIC::GetName(runtime_operands_type_)); 7259 BinaryOpIC::GetName(runtime_operands_type_));
7257 return name_; 7260 return name_;
7258 } 7261 }
7259 7262
7260 7263
7261 #undef __ 7264 #undef __
7262 7265
7263 } } // namespace v8::internal 7266 } } // namespace v8::internal
7264 7267
7265 #endif // V8_TARGET_ARCH_ARM 7268 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.h ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698