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

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

Issue 1960663002: Convert primitive receivers for API property callbacks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 7 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
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/code-stub-assembler.h" 10 #include "src/code-stub-assembler.h"
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 private: 1489 private:
1490 class ConstantIndexBits : public BitField<int, 0, kSubMinorKeyBits> {}; 1490 class ConstantIndexBits : public BitField<int, 0, kSubMinorKeyBits> {};
1491 1491
1492 DEFINE_HANDLER_CODE_STUB(LoadConstant, HandlerStub); 1492 DEFINE_HANDLER_CODE_STUB(LoadConstant, HandlerStub);
1493 }; 1493 };
1494 1494
1495 class LoadApiGetterStub : public TurboFanCodeStub { 1495 class LoadApiGetterStub : public TurboFanCodeStub {
1496 public: 1496 public:
1497 LoadApiGetterStub(Isolate* isolate, bool receiver_is_holder, int index) 1497 LoadApiGetterStub(Isolate* isolate, bool receiver_is_holder, int index)
1498 : TurboFanCodeStub(isolate) { 1498 : TurboFanCodeStub(isolate) {
1499 // If that's not true, we need to ensure that the receiver is actually a
1500 // JSReceiver. http://crbug.com/609134
1501 DCHECK(receiver_is_holder);
1499 minor_key_ = IndexBits::encode(index) | 1502 minor_key_ = IndexBits::encode(index) |
1500 ReceiverIsHolderBits::encode(receiver_is_holder); 1503 ReceiverIsHolderBits::encode(receiver_is_holder);
1501 } 1504 }
1502 1505
1503 Code::Kind GetCodeKind() const override { return Code::HANDLER; } 1506 Code::Kind GetCodeKind() const override { return Code::HANDLER; }
1504 ExtraICState GetExtraICState() const override { return Code::LOAD_IC; } 1507 ExtraICState GetExtraICState() const override { return Code::LOAD_IC; }
1505 InlineCacheState GetICState() const override { return MONOMORPHIC; } 1508 InlineCacheState GetICState() const override { return MONOMORPHIC; }
1506 1509
1507 int index() const { return IndexBits::decode(minor_key_); } 1510 int index() const { return IndexBits::decode(minor_key_); }
1508 bool receiver_is_holder() const { 1511 bool receiver_is_holder() const {
(...skipping 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after
3232 #undef DEFINE_HYDROGEN_CODE_STUB 3235 #undef DEFINE_HYDROGEN_CODE_STUB
3233 #undef DEFINE_CODE_STUB 3236 #undef DEFINE_CODE_STUB
3234 #undef DEFINE_CODE_STUB_BASE 3237 #undef DEFINE_CODE_STUB_BASE
3235 3238
3236 extern Representation RepresentationFromType(Type* type); 3239 extern Representation RepresentationFromType(Type* type);
3237 3240
3238 } // namespace internal 3241 } // namespace internal
3239 } // namespace v8 3242 } // namespace v8
3240 3243
3241 #endif // V8_CODE_STUBS_H_ 3244 #endif // V8_CODE_STUBS_H_
OLDNEW
« src/accessors.cc ('K') | « src/accessors.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698