OLD | NEW |
---|---|
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 #ifndef V8_CODE_STUBS_H_ | 5 #ifndef V8_CODE_STUBS_H_ |
6 #define V8_CODE_STUBS_H_ | 6 #define V8_CODE_STUBS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 2437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2448 ElementsKind from_kind() const { return from_kind_; } | 2448 ElementsKind from_kind() const { return from_kind_; } |
2449 ElementsKind to_kind() const { return to_kind_; } | 2449 ElementsKind to_kind() const { return to_kind_; } |
2450 bool is_jsarray() const { return is_jsarray_; } | 2450 bool is_jsarray() const { return is_jsarray_; } |
2451 KeyedAccessStoreMode store_mode() const { return store_mode_; } | 2451 KeyedAccessStoreMode store_mode() const { return store_mode_; } |
2452 | 2452 |
2453 virtual Handle<Code> GenerateCode() V8_OVERRIDE; | 2453 virtual Handle<Code> GenerateCode() V8_OVERRIDE; |
2454 | 2454 |
2455 virtual void InitializeInterfaceDescriptor( | 2455 virtual void InitializeInterfaceDescriptor( |
2456 CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE; | 2456 CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE; |
2457 | 2457 |
2458 enum RegisterInfo { | |
Michael Starzinger
2014/07/11 08:27:08
nit: Let's add a comment "// Parameters accessed v
mvstanton
2014/07/11 08:43:09
Cool, I'll add the comment. As for the enum format
Michael Starzinger
2014/07/11 09:04:10
As discussed offline: In this case I am fine with
| |
2459 kValueIndex, | |
2460 kMapIndex, | |
2461 kKeyIndex, | |
2462 kObjectIndex, | |
2463 kRegisterArgumentCount | |
Michael Starzinger
2014/07/11 08:27:08
nit: The register count doesn't seem to be used. C
mvstanton
2014/07/11 08:43:09
It's part of the convention, and is used in some a
Michael Starzinger
2014/07/11 09:04:10
Acknowledged.
| |
2464 }; | |
2465 | |
2466 static const Register ValueRegister() { | |
2467 return KeyedStoreIC::ValueRegister(); | |
2468 } | |
2469 static const Register MapRegister() { return KeyedStoreIC::MapRegister(); } | |
2470 static const Register KeyRegister() { return KeyedStoreIC::NameRegister(); } | |
2471 static const Register ObjectRegister() { | |
2472 return KeyedStoreIC::ReceiverRegister(); | |
2473 } | |
2474 | |
2458 private: | 2475 private: |
2459 class FromBits: public BitField<ElementsKind, 0, 8> {}; | 2476 class FromBits: public BitField<ElementsKind, 0, 8> {}; |
2460 class ToBits: public BitField<ElementsKind, 8, 8> {}; | 2477 class ToBits: public BitField<ElementsKind, 8, 8> {}; |
2461 class IsJSArrayBits: public BitField<bool, 16, 1> {}; | 2478 class IsJSArrayBits: public BitField<bool, 16, 1> {}; |
2462 class StoreModeBits: public BitField<KeyedAccessStoreMode, 17, 4> {}; | 2479 class StoreModeBits: public BitField<KeyedAccessStoreMode, 17, 4> {}; |
2463 | 2480 |
2464 Major MajorKey() const { return ElementsTransitionAndStore; } | 2481 Major MajorKey() const { return ElementsTransitionAndStore; } |
2465 int NotMissMinorKey() const { | 2482 int NotMissMinorKey() const { |
2466 return FromBits::encode(from_kind_) | | 2483 return FromBits::encode(from_kind_) | |
2467 ToBits::encode(to_kind_) | | 2484 ToBits::encode(to_kind_) | |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2540 | 2557 |
2541 | 2558 |
2542 class CallDescriptors { | 2559 class CallDescriptors { |
2543 public: | 2560 public: |
2544 static void InitializeForIsolate(Isolate* isolate); | 2561 static void InitializeForIsolate(Isolate* isolate); |
2545 }; | 2562 }; |
2546 | 2563 |
2547 } } // namespace v8::internal | 2564 } } // namespace v8::internal |
2548 | 2565 |
2549 #endif // V8_CODE_STUBS_H_ | 2566 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |