| 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_IC_H_ | 5 #ifndef V8_IC_H_ |
| 6 #define V8_IC_H_ | 6 #define V8_IC_H_ |
| 7 | 7 |
| 8 #include "src/ic/ic-state.h" | 8 #include "src/ic/ic-state.h" |
| 9 #include "src/macro-assembler.h" | 9 #include "src/macro-assembler.h" |
| 10 #include "src/messages.h" | 10 #include "src/messages.h" |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 DCHECK(IsLoadStub()); | 279 DCHECK(IsLoadStub()); |
| 280 } | 280 } |
| 281 | 281 |
| 282 bool ShouldThrowReferenceError() const { | 282 bool ShouldThrowReferenceError() const { |
| 283 return kind() == Code::LOAD_GLOBAL_IC && | 283 return kind() == Code::LOAD_GLOBAL_IC && |
| 284 LoadGlobalICState::GetTypeofMode(extra_ic_state()) == | 284 LoadGlobalICState::GetTypeofMode(extra_ic_state()) == |
| 285 NOT_INSIDE_TYPEOF; | 285 NOT_INSIDE_TYPEOF; |
| 286 } | 286 } |
| 287 | 287 |
| 288 // Code generator routines. | 288 // Code generator routines. |
| 289 | |
| 290 static void GenerateMiss(MacroAssembler* masm); | |
| 291 static void GenerateRuntimeGetProperty(MacroAssembler* masm); | 289 static void GenerateRuntimeGetProperty(MacroAssembler* masm); |
| 292 static void GenerateNormal(MacroAssembler* masm); | 290 static void GenerateNormal(MacroAssembler* masm); |
| 293 | 291 |
| 294 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, | 292 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, |
| 295 Handle<Name> name); | 293 Handle<Name> name); |
| 296 | 294 |
| 297 static void Clear(Isolate* isolate, Code* host, LoadICNexus* nexus); | 295 static void Clear(Isolate* isolate, Code* host, LoadICNexus* nexus); |
| 298 | 296 |
| 299 protected: | 297 protected: |
| 300 virtual Handle<Code> slow_stub() const { | 298 virtual Handle<Code> slow_stub() const { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 public: | 345 public: |
| 348 KeyedLoadIC(FrameDepth depth, Isolate* isolate, | 346 KeyedLoadIC(FrameDepth depth, Isolate* isolate, |
| 349 KeyedLoadICNexus* nexus = NULL) | 347 KeyedLoadICNexus* nexus = NULL) |
| 350 : LoadIC(depth, isolate, nexus) { | 348 : LoadIC(depth, isolate, nexus) { |
| 351 DCHECK(nexus != NULL); | 349 DCHECK(nexus != NULL); |
| 352 } | 350 } |
| 353 | 351 |
| 354 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, | 352 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, |
| 355 Handle<Object> key); | 353 Handle<Object> key); |
| 356 | 354 |
| 357 // Code generator routines. | |
| 358 static void GenerateMiss(MacroAssembler* masm); | |
| 359 static void GenerateRuntimeGetProperty(MacroAssembler* masm); | |
| 360 | |
| 361 static void Clear(Isolate* isolate, Code* host, KeyedLoadICNexus* nexus); | 355 static void Clear(Isolate* isolate, Code* host, KeyedLoadICNexus* nexus); |
| 362 | 356 |
| 363 protected: | 357 protected: |
| 364 // receiver is HeapObject because it could be a String or a JSObject | 358 // receiver is HeapObject because it could be a String or a JSObject |
| 365 void UpdateLoadElement(Handle<HeapObject> receiver); | 359 void UpdateLoadElement(Handle<HeapObject> receiver); |
| 366 | 360 |
| 367 private: | 361 private: |
| 368 friend class IC; | 362 friend class IC; |
| 369 }; | 363 }; |
| 370 | 364 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 | 509 |
| 516 // Helper for BinaryOpIC and CompareIC. | 510 // Helper for BinaryOpIC and CompareIC. |
| 517 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 511 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
| 518 void PatchInlinedSmiCode(Isolate* isolate, Address address, | 512 void PatchInlinedSmiCode(Isolate* isolate, Address address, |
| 519 InlinedSmiCheck check); | 513 InlinedSmiCheck check); |
| 520 | 514 |
| 521 } // namespace internal | 515 } // namespace internal |
| 522 } // namespace v8 | 516 } // namespace v8 |
| 523 | 517 |
| 524 #endif // V8_IC_H_ | 518 #endif // V8_IC_H_ |
| OLD | NEW |