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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 | 340 |
341 // Code generator routines. | 341 // Code generator routines. |
342 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } | 342 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
343 static void GeneratePreMonomorphic(MacroAssembler* masm) { | 343 static void GeneratePreMonomorphic(MacroAssembler* masm) { |
344 GenerateMiss(masm); | 344 GenerateMiss(masm); |
345 } | 345 } |
346 static void GenerateMiss(MacroAssembler* masm); | 346 static void GenerateMiss(MacroAssembler* masm); |
347 static void GenerateMegamorphic(MacroAssembler* masm); | 347 static void GenerateMegamorphic(MacroAssembler* masm); |
348 static void GenerateNormal(MacroAssembler* masm); | 348 static void GenerateNormal(MacroAssembler* masm); |
349 | 349 |
350 // Specialized code generator routines. | |
351 static void GenerateArrayLength(MacroAssembler* masm); | |
352 static void GenerateFunctionPrototype(MacroAssembler* masm); | |
353 | |
354 MUST_USE_RESULT MaybeObject* Load(State state, | 350 MUST_USE_RESULT MaybeObject* Load(State state, |
355 Handle<Object> object, | 351 Handle<Object> object, |
356 Handle<String> name); | 352 Handle<String> name); |
357 | 353 |
358 protected: | 354 protected: |
359 virtual Code::Kind kind() const { return Code::LOAD_IC; } | 355 virtual Code::Kind kind() const { return Code::LOAD_IC; } |
360 | 356 |
361 virtual Handle<Code> generic_stub() const { | 357 virtual Handle<Code> generic_stub() const { |
362 UNREACHABLE(); | 358 UNREACHABLE(); |
363 return Handle<Code>::null(); | 359 return Handle<Code>::null(); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 public: | 472 public: |
477 explicit StoreIC(Isolate* isolate) : IC(NO_EXTRA_FRAME, isolate) { | 473 explicit StoreIC(Isolate* isolate) : IC(NO_EXTRA_FRAME, isolate) { |
478 ASSERT(target()->is_store_stub() || target()->is_keyed_store_stub()); | 474 ASSERT(target()->is_store_stub() || target()->is_keyed_store_stub()); |
479 } | 475 } |
480 | 476 |
481 // Code generators for stub routines. Only called once at startup. | 477 // Code generators for stub routines. Only called once at startup. |
482 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } | 478 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
483 static void GenerateMiss(MacroAssembler* masm); | 479 static void GenerateMiss(MacroAssembler* masm); |
484 static void GenerateMegamorphic(MacroAssembler* masm, | 480 static void GenerateMegamorphic(MacroAssembler* masm, |
485 StrictModeFlag strict_mode); | 481 StrictModeFlag strict_mode); |
486 static void GenerateArrayLength(MacroAssembler* masm); | |
487 static void GenerateNormal(MacroAssembler* masm); | 482 static void GenerateNormal(MacroAssembler* masm); |
488 static void GenerateGlobalProxy(MacroAssembler* masm, | 483 static void GenerateGlobalProxy(MacroAssembler* masm, |
489 StrictModeFlag strict_mode); | 484 StrictModeFlag strict_mode); |
490 | 485 |
491 MUST_USE_RESULT MaybeObject* Store( | 486 MUST_USE_RESULT MaybeObject* Store( |
492 State state, | 487 State state, |
493 StrictModeFlag strict_mode, | 488 StrictModeFlag strict_mode, |
494 Handle<Object> object, | 489 Handle<Object> object, |
495 Handle<String> name, | 490 Handle<String> name, |
496 Handle<Object> value, | 491 Handle<Object> value, |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 | 802 |
808 // Helper for BinaryOpIC and CompareIC. | 803 // Helper for BinaryOpIC and CompareIC. |
809 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 804 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
810 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); | 805 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); |
811 | 806 |
812 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_Miss); | 807 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_Miss); |
813 | 808 |
814 } } // namespace v8::internal | 809 } } // namespace v8::internal |
815 | 810 |
816 #endif // V8_IC_H_ | 811 #endif // V8_IC_H_ |
OLD | NEW |