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

Side by Side Diff: src/code-stubs.h

Issue 385553004: Use the same registers for StoreIC and KeyedStoreIC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Patch One. 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/arm64/stub-cache-arm64.cc ('k') | src/code-stubs.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 #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
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 {
2459 kValueIndex,
2460 kMapIndex,
2461 kKeyIndex,
2462 kObjectIndex,
2463 kRegisterArgumentCount
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
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_
OLDNEW
« no previous file with comments | « src/arm64/stub-cache-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698