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

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

Issue 385173009: Remove ASSERT since there are tons of different ASSIGN variants (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/full-codegen-ia32.cc ('k') | no next file » | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2408 matching lines...) Expand 10 before | Expand all | Expand 10 after
2419 __ movp(rdx, location); 2419 __ movp(rdx, location);
2420 __ CompareRoot(rdx, Heap::kTheHoleValueRootIndex); 2420 __ CompareRoot(rdx, Heap::kTheHoleValueRootIndex);
2421 __ j(not_equal, &assign, Label::kNear); 2421 __ j(not_equal, &assign, Label::kNear);
2422 __ Push(var->name()); 2422 __ Push(var->name());
2423 __ CallRuntime(Runtime::kThrowReferenceError, 1); 2423 __ CallRuntime(Runtime::kThrowReferenceError, 1);
2424 __ bind(&assign); 2424 __ bind(&assign);
2425 EmitStoreToStackLocalOrContextSlot(var, location); 2425 EmitStoreToStackLocalOrContextSlot(var, location);
2426 2426
2427 } else if (!var->is_const_mode() || op == Token::INIT_CONST) { 2427 } else if (!var->is_const_mode() || op == Token::INIT_CONST) {
2428 if (var->IsLookupSlot()) { 2428 if (var->IsLookupSlot()) {
2429 ASSERT(op == Token::ASSIGN || op == Token::INIT_VAR ||
2430 op == Token::ASSIGN_ADD);
2431 // Assignment to var. 2429 // Assignment to var.
2432 __ Push(rax); // Value. 2430 __ Push(rax); // Value.
2433 __ Push(rsi); // Context. 2431 __ Push(rsi); // Context.
2434 __ Push(var->name()); 2432 __ Push(var->name());
2435 __ Push(Smi::FromInt(strict_mode())); 2433 __ Push(Smi::FromInt(strict_mode()));
2436 __ CallRuntime(Runtime::kStoreLookupSlot, 4); 2434 __ CallRuntime(Runtime::kStoreLookupSlot, 4);
2437 } else { 2435 } else {
2438 // Assignment to var or initializing assignment to let/const in harmony 2436 // Assignment to var or initializing assignment to let/const in harmony
2439 // mode. 2437 // mode.
2440 ASSERT(var->IsStackAllocated() || var->IsContextSlot()); 2438 ASSERT(var->IsStackAllocated() || var->IsContextSlot());
(...skipping 2367 matching lines...) Expand 10 before | Expand all | Expand 10 after
4808 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4806 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4809 Assembler::target_address_at(call_target_address, 4807 Assembler::target_address_at(call_target_address,
4810 unoptimized_code)); 4808 unoptimized_code));
4811 return OSR_AFTER_STACK_CHECK; 4809 return OSR_AFTER_STACK_CHECK;
4812 } 4810 }
4813 4811
4814 4812
4815 } } // namespace v8::internal 4813 } } // namespace v8::internal
4816 4814
4817 #endif // V8_TARGET_ARCH_X64 4815 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698