OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 22 matching lines...) Expand all Loading... |
33 #include "code-stubs.h" | 33 #include "code-stubs.h" |
34 #include "deoptimizer.h" | 34 #include "deoptimizer.h" |
35 #include "stub-cache.h" | 35 #include "stub-cache.h" |
36 | 36 |
37 namespace v8 { | 37 namespace v8 { |
38 namespace internal { | 38 namespace internal { |
39 | 39 |
40 | 40 |
41 // When invoking builtins, we need to record the safepoint in the middle of | 41 // When invoking builtins, we need to record the safepoint in the middle of |
42 // the invoke instruction sequence generated by the macro assembler. | 42 // the invoke instruction sequence generated by the macro assembler. |
43 class SafepointGenerator : public PostCallGenerator { | 43 class SafepointGenerator : public CallWrapper { |
44 public: | 44 public: |
45 SafepointGenerator(LCodeGen* codegen, | 45 SafepointGenerator(LCodeGen* codegen, |
46 LPointerMap* pointers, | 46 LPointerMap* pointers, |
47 int deoptimization_index) | 47 int deoptimization_index) |
48 : codegen_(codegen), | 48 : codegen_(codegen), |
49 pointers_(pointers), | 49 pointers_(pointers), |
50 deoptimization_index_(deoptimization_index) {} | 50 deoptimization_index_(deoptimization_index) {} |
51 virtual ~SafepointGenerator() { } | 51 virtual ~SafepointGenerator() { } |
52 | 52 |
53 virtual void Generate() { | 53 virtual void BeforeCall(int call_size) {} |
| 54 |
| 55 virtual void AfterCall() { |
54 codegen_->RecordSafepoint(pointers_, deoptimization_index_); | 56 codegen_->RecordSafepoint(pointers_, deoptimization_index_); |
55 } | 57 } |
56 | 58 |
57 private: | 59 private: |
58 LCodeGen* codegen_; | 60 LCodeGen* codegen_; |
59 LPointerMap* pointers_; | 61 LPointerMap* pointers_; |
60 int deoptimization_index_; | 62 int deoptimization_index_; |
61 }; | 63 }; |
62 | 64 |
63 | 65 |
(...skipping 4233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4297 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 4299 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
4298 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, &safepoint_generator); | 4300 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, &safepoint_generator); |
4299 } | 4301 } |
4300 | 4302 |
4301 | 4303 |
4302 #undef __ | 4304 #undef __ |
4303 | 4305 |
4304 } } // namespace v8::internal | 4306 } } // namespace v8::internal |
4305 | 4307 |
4306 #endif // V8_TARGET_ARCH_IA32 | 4308 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |