Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 18 matching lines...) Expand all Loading... | |
| 29 | 29 |
| 30 #if defined(V8_TARGET_ARCH_X64) | 30 #if defined(V8_TARGET_ARCH_X64) |
| 31 | 31 |
| 32 #include "bootstrapper.h" | 32 #include "bootstrapper.h" |
| 33 #include "code-stubs.h" | 33 #include "code-stubs.h" |
| 34 #include "regexp-macro-assembler.h" | 34 #include "regexp-macro-assembler.h" |
| 35 | 35 |
| 36 namespace v8 { | 36 namespace v8 { |
| 37 namespace internal { | 37 namespace internal { |
| 38 | 38 |
| 39 | |
| 40 CodeStubInterfaceDescriptor* | |
| 41 KeyedLoadFastElementStub::GetInterfaceDescriptor(Isolate* isolate) { | |
|
Jakob Kummerow
2012/11/28 16:28:22
nit: indentation please
danno
2012/11/30 16:23:24
Done.
| |
| 42 static bool initialized = false; | |
| 43 static CodeStubInterfaceDescriptor* result; | |
| 44 if (!initialized) { | |
| 45 Handle<Code> miss = isolate->builtins()->KeyedLoadIC_Miss(); | |
| 46 static Register registers[] = { rdx, rax }; | |
| 47 static CodeStubInterfaceDescriptor info = { | |
| 48 2, | |
| 49 registers, | |
| 50 miss | |
| 51 }; | |
| 52 result = &info; | |
| 53 initialized = true; | |
| 54 } | |
| 55 return result; | |
| 56 } | |
| 57 | |
| 58 | |
| 39 #define __ ACCESS_MASM(masm) | 59 #define __ ACCESS_MASM(masm) |
| 40 | 60 |
| 41 void ToNumberStub::Generate(MacroAssembler* masm) { | 61 void ToNumberStub::Generate(MacroAssembler* masm) { |
| 42 // The ToNumber stub takes one argument in eax. | 62 // The ToNumber stub takes one argument in eax. |
| 43 Label check_heap_number, call_builtin; | 63 Label check_heap_number, call_builtin; |
| 44 __ SmiTest(rax); | 64 __ SmiTest(rax); |
| 45 __ j(not_zero, &check_heap_number, Label::kNear); | 65 __ j(not_zero, &check_heap_number, Label::kNear); |
| 46 __ Ret(); | 66 __ Ret(); |
| 47 | 67 |
| 48 __ bind(&check_heap_number); | 68 __ bind(&check_heap_number); |
| (...skipping 6420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6469 #endif | 6489 #endif |
| 6470 | 6490 |
| 6471 __ Ret(); | 6491 __ Ret(); |
| 6472 } | 6492 } |
| 6473 | 6493 |
| 6474 #undef __ | 6494 #undef __ |
| 6475 | 6495 |
| 6476 } } // namespace v8::internal | 6496 } } // namespace v8::internal |
| 6477 | 6497 |
| 6478 #endif // V8_TARGET_ARCH_X64 | 6498 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |