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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 } | 335 } |
336 | 336 |
337 static void GenerateMegamorphic(MacroAssembler* masm, int argc); | 337 static void GenerateMegamorphic(MacroAssembler* masm, int argc); |
338 static void GenerateNormal(MacroAssembler* masm, int argc); | 338 static void GenerateNormal(MacroAssembler* masm, int argc); |
339 static void GenerateNonStrictArguments(MacroAssembler* masm, int argc); | 339 static void GenerateNonStrictArguments(MacroAssembler* masm, int argc); |
340 }; | 340 }; |
341 | 341 |
342 | 342 |
343 class LoadIC: public IC { | 343 class LoadIC: public IC { |
344 public: | 344 public: |
345 explicit LoadIC(Isolate* isolate) : IC(NO_EXTRA_FRAME, isolate) { | 345 explicit LoadIC(FrameDepth depth, Isolate* isolate) : IC(depth, isolate) { |
346 ASSERT(target()->is_load_stub() || target()->is_keyed_load_stub()); | 346 ASSERT(target()->is_load_stub() || target()->is_keyed_load_stub()); |
347 } | 347 } |
348 | 348 |
349 // Code generator routines. | 349 // Code generator routines. |
350 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } | 350 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
351 static void GeneratePreMonomorphic(MacroAssembler* masm) { | 351 static void GeneratePreMonomorphic(MacroAssembler* masm) { |
352 GenerateMiss(masm); | 352 GenerateMiss(masm); |
353 } | 353 } |
354 static void GenerateMiss(MacroAssembler* masm); | 354 static void GenerateMiss(MacroAssembler* masm); |
355 static void GenerateMegamorphic(MacroAssembler* masm); | 355 static void GenerateMegamorphic(MacroAssembler* masm); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 | 397 |
398 | 398 |
399 enum ICMissMode { | 399 enum ICMissMode { |
400 MISS_FORCE_GENERIC, | 400 MISS_FORCE_GENERIC, |
401 MISS | 401 MISS |
402 }; | 402 }; |
403 | 403 |
404 | 404 |
405 class KeyedLoadIC: public LoadIC { | 405 class KeyedLoadIC: public LoadIC { |
406 public: | 406 public: |
407 explicit KeyedLoadIC(Isolate* isolate) : LoadIC(isolate) { | 407 explicit KeyedLoadIC(FrameDepth depth, Isolate* isolate) |
| 408 : LoadIC(depth, isolate) { |
408 ASSERT(target()->is_keyed_load_stub()); | 409 ASSERT(target()->is_keyed_load_stub()); |
409 } | 410 } |
410 | 411 |
411 MUST_USE_RESULT MaybeObject* Load(State state, | 412 MUST_USE_RESULT MaybeObject* Load(State state, |
412 Handle<Object> object, | 413 Handle<Object> object, |
413 Handle<Object> key, | 414 Handle<Object> key, |
414 ICMissMode force_generic); | 415 ICMissMode force_generic); |
415 | 416 |
416 // Code generator routines. | 417 // Code generator routines. |
417 static void GenerateMiss(MacroAssembler* masm, ICMissMode force_generic); | 418 static void GenerateMiss(MacroAssembler* masm, ICMissMode force_generic); |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 | 807 |
807 void patch(Code* code); | 808 void patch(Code* code); |
808 }; | 809 }; |
809 | 810 |
810 | 811 |
811 // Helper for BinaryOpIC and CompareIC. | 812 // Helper for BinaryOpIC and CompareIC. |
812 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 813 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
813 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); | 814 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); |
814 | 815 |
815 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_Miss); | 816 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_Miss); |
| 817 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); |
816 | 818 |
817 } } // namespace v8::internal | 819 } } // namespace v8::internal |
818 | 820 |
819 #endif // V8_IC_H_ | 821 #endif // V8_IC_H_ |
OLD | NEW |