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

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

Issue 408463003: Remove harmony-typeof (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update flag description for harmony 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/lithium-codegen-ia32.cc ('k') | src/mips/lithium-codegen-mips.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 // 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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 4473 matching lines...) Expand 10 before | Expand all | Expand 10 after
4484 if_true, if_false, fall_through); 4484 if_true, if_false, fall_through);
4485 } else if (String::Equals(check, factory->symbol_string())) { 4485 } else if (String::Equals(check, factory->symbol_string())) {
4486 __ JumpIfSmi(v0, if_false); 4486 __ JumpIfSmi(v0, if_false);
4487 __ GetObjectType(v0, v0, a1); 4487 __ GetObjectType(v0, v0, a1);
4488 Split(eq, a1, Operand(SYMBOL_TYPE), if_true, if_false, fall_through); 4488 Split(eq, a1, Operand(SYMBOL_TYPE), if_true, if_false, fall_through);
4489 } else if (String::Equals(check, factory->boolean_string())) { 4489 } else if (String::Equals(check, factory->boolean_string())) {
4490 __ LoadRoot(at, Heap::kTrueValueRootIndex); 4490 __ LoadRoot(at, Heap::kTrueValueRootIndex);
4491 __ Branch(if_true, eq, v0, Operand(at)); 4491 __ Branch(if_true, eq, v0, Operand(at));
4492 __ LoadRoot(at, Heap::kFalseValueRootIndex); 4492 __ LoadRoot(at, Heap::kFalseValueRootIndex);
4493 Split(eq, v0, Operand(at), if_true, if_false, fall_through); 4493 Split(eq, v0, Operand(at), if_true, if_false, fall_through);
4494 } else if (FLAG_harmony_typeof &&
4495 String::Equals(check, factory->null_string())) {
4496 __ LoadRoot(at, Heap::kNullValueRootIndex);
4497 Split(eq, v0, Operand(at), if_true, if_false, fall_through);
4498 } else if (String::Equals(check, factory->undefined_string())) { 4494 } else if (String::Equals(check, factory->undefined_string())) {
4499 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); 4495 __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
4500 __ Branch(if_true, eq, v0, Operand(at)); 4496 __ Branch(if_true, eq, v0, Operand(at));
4501 __ JumpIfSmi(v0, if_false); 4497 __ JumpIfSmi(v0, if_false);
4502 // Check for undetectable objects => true. 4498 // Check for undetectable objects => true.
4503 __ lw(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); 4499 __ lw(v0, FieldMemOperand(v0, HeapObject::kMapOffset));
4504 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); 4500 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset));
4505 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); 4501 __ And(a1, a1, Operand(1 << Map::kIsUndetectable));
4506 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through); 4502 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through);
4507 } else if (String::Equals(check, factory->function_string())) { 4503 } else if (String::Equals(check, factory->function_string())) {
4508 __ JumpIfSmi(v0, if_false); 4504 __ JumpIfSmi(v0, if_false);
4509 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); 4505 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2);
4510 __ GetObjectType(v0, v0, a1); 4506 __ GetObjectType(v0, v0, a1);
4511 __ Branch(if_true, eq, a1, Operand(JS_FUNCTION_TYPE)); 4507 __ Branch(if_true, eq, a1, Operand(JS_FUNCTION_TYPE));
4512 Split(eq, a1, Operand(JS_FUNCTION_PROXY_TYPE), 4508 Split(eq, a1, Operand(JS_FUNCTION_PROXY_TYPE),
4513 if_true, if_false, fall_through); 4509 if_true, if_false, fall_through);
4514 } else if (String::Equals(check, factory->object_string())) { 4510 } else if (String::Equals(check, factory->object_string())) {
4515 __ JumpIfSmi(v0, if_false); 4511 __ JumpIfSmi(v0, if_false);
4516 if (!FLAG_harmony_typeof) { 4512 __ LoadRoot(at, Heap::kNullValueRootIndex);
4517 __ LoadRoot(at, Heap::kNullValueRootIndex); 4513 __ Branch(if_true, eq, v0, Operand(at));
4518 __ Branch(if_true, eq, v0, Operand(at));
4519 }
4520 // Check for JS objects => true. 4514 // Check for JS objects => true.
4521 __ GetObjectType(v0, v0, a1); 4515 __ GetObjectType(v0, v0, a1);
4522 __ Branch(if_false, lt, a1, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); 4516 __ Branch(if_false, lt, a1, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE));
4523 __ lbu(a1, FieldMemOperand(v0, Map::kInstanceTypeOffset)); 4517 __ lbu(a1, FieldMemOperand(v0, Map::kInstanceTypeOffset));
4524 __ Branch(if_false, gt, a1, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE)); 4518 __ Branch(if_false, gt, a1, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE));
4525 // Check for undetectable objects => false. 4519 // Check for undetectable objects => false.
4526 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); 4520 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset));
4527 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); 4521 __ And(a1, a1, Operand(1 << Map::kIsUndetectable));
4528 Split(eq, a1, Operand(zero_reg), if_true, if_false, fall_through); 4522 Split(eq, a1, Operand(zero_reg), if_true, if_false, fall_through);
4529 } else { 4523 } else {
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
4854 Assembler::target_address_at(pc_immediate_load_address)) == 4848 Assembler::target_address_at(pc_immediate_load_address)) ==
4855 reinterpret_cast<uint32_t>( 4849 reinterpret_cast<uint32_t>(
4856 isolate->builtins()->OsrAfterStackCheck()->entry())); 4850 isolate->builtins()->OsrAfterStackCheck()->entry()));
4857 return OSR_AFTER_STACK_CHECK; 4851 return OSR_AFTER_STACK_CHECK;
4858 } 4852 }
4859 4853
4860 4854
4861 } } // namespace v8::internal 4855 } } // namespace v8::internal
4862 4856
4863 #endif // V8_TARGET_ARCH_MIPS 4857 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698