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

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

Issue 6665067: [Arguments] Remove synthetic properties and all code dealing with them. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | arguments/src/arm/full-codegen-arm.cc » ('j') | arguments/src/scopes.cc » ('J')
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 4336 matching lines...) Expand 10 before | Expand all | Expand 10 after
4347 4347
4348 } else { 4348 } else {
4349 // ------------------------------------------- 4349 // -------------------------------------------
4350 // JavaScript example: 'array[index](1, 2, 3)' 4350 // JavaScript example: 'array[index](1, 2, 3)'
4351 // ------------------------------------------- 4351 // -------------------------------------------
4352 4352
4353 // Load the receiver and name of the function. 4353 // Load the receiver and name of the function.
4354 Load(property->obj()); 4354 Load(property->obj());
4355 Load(property->key()); 4355 Load(property->key());
4356 4356
4357 if (property->is_synthetic()) { 4357 // Swap the name of the function and the receiver on the stack to follow
4358 EmitKeyedLoad(); 4358 // the calling convention for call ICs.
4359 // Put the function below the receiver. 4359 Register key = frame_->PopToRegister();
4360 // Use the global receiver. 4360 Register receiver = frame_->PopToRegister(key);
4361 frame_->EmitPush(r0); // Function. 4361 frame_->EmitPush(key);
4362 LoadGlobalReceiver(VirtualFrame::scratch0()); 4362 frame_->EmitPush(receiver);
4363 // Call the function.
4364 CallWithArguments(args, RECEIVER_MIGHT_BE_VALUE, node->position());
4365 frame_->EmitPush(r0);
4366 } else {
4367 // Swap the name of the function and the receiver on the stack to follow
4368 // the calling convention for call ICs.
4369 Register key = frame_->PopToRegister();
4370 Register receiver = frame_->PopToRegister(key);
4371 frame_->EmitPush(key);
4372 frame_->EmitPush(receiver);
4373 4363
4374 // Load the arguments. 4364 // Load the arguments.
4375 int arg_count = args->length(); 4365 int arg_count = args->length();
4376 for (int i = 0; i < arg_count; i++) { 4366 for (int i = 0; i < arg_count; i++) {
4377 Load(args->at(i)); 4367 Load(args->at(i));
4378 } 4368 }
4379 4369
4380 // Load the key into r2 and call the IC initialization code. 4370 // Load the key into r2 and call the IC initialization code.
4381 InLoopFlag in_loop = loop_nesting() > 0 ? IN_LOOP : NOT_IN_LOOP; 4371 InLoopFlag in_loop = loop_nesting() > 0 ? IN_LOOP : NOT_IN_LOOP;
4382 Handle<Code> stub = 4372 Handle<Code> stub =
4383 StubCache::ComputeKeyedCallInitialize(arg_count, in_loop); 4373 StubCache::ComputeKeyedCallInitialize(arg_count, in_loop);
4384 CodeForSourcePosition(node->position()); 4374 CodeForSourcePosition(node->position());
4385 frame_->SpillAll(); 4375 frame_->SpillAll();
4386 __ ldr(r2, frame_->ElementAt(arg_count + 1)); 4376 __ ldr(r2, frame_->ElementAt(arg_count + 1));
4387 frame_->CallCodeObject(stub, RelocInfo::CODE_TARGET, arg_count + 1); 4377 frame_->CallCodeObject(stub, RelocInfo::CODE_TARGET, arg_count + 1);
4388 frame_->Drop(); // Drop the key still on the stack. 4378 frame_->Drop(); // Drop the key still on the stack.
4389 __ ldr(cp, frame_->Context()); 4379 __ ldr(cp, frame_->Context());
4390 frame_->EmitPush(r0); 4380 frame_->EmitPush(r0);
4391 }
4392 } 4381 }
4393 4382
4394 } else { 4383 } else {
4395 // ---------------------------------- 4384 // ----------------------------------
4396 // JavaScript example: 'foo(1, 2, 3)' // foo is not global 4385 // JavaScript example: 'foo(1, 2, 3)' // foo is not global
4397 // ---------------------------------- 4386 // ----------------------------------
4398 4387
4399 // Load the function. 4388 // Load the function.
4400 Load(function); 4389 Load(function);
4401 4390
(...skipping 2997 matching lines...) Expand 10 before | Expand all | Expand 10 after
7399 BinaryOpIC::GetName(runtime_operands_type_)); 7388 BinaryOpIC::GetName(runtime_operands_type_));
7400 return name_; 7389 return name_;
7401 } 7390 }
7402 7391
7403 7392
7404 #undef __ 7393 #undef __
7405 7394
7406 } } // namespace v8::internal 7395 } } // namespace v8::internal
7407 7396
7408 #endif // V8_TARGET_ARCH_ARM 7397 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | arguments/src/arm/full-codegen-arm.cc » ('j') | arguments/src/scopes.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698