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

Side by Side Diff: src/ia32/simulator-ia32.h

Issue 282783004: Reland of "v8::TryCatch now works correctly with ASAN's UseAfterReturn mode enabled." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remake Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/base/macros.h ('k') | src/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_IA32_SIMULATOR_IA32_H_ 5 #ifndef V8_IA32_SIMULATOR_IA32_H_
6 #define V8_IA32_SIMULATOR_IA32_H_ 6 #define V8_IA32_SIMULATOR_IA32_H_
7 7
8 #include "allocation.h" 8 #include "allocation.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 12
13 // Since there is no simulator for the ia32 architecture the only thing we can 13 // Since there is no simulator for the ia32 architecture the only thing we can
14 // do is to call the entry directly. 14 // do is to call the entry directly.
15 #define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \ 15 #define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \
16 (entry(p0, p1, p2, p3, p4)) 16 (entry(p0, p1, p2, p3, p4))
17 17
18 18
19 typedef int (*regexp_matcher)(String*, int, const byte*, 19 typedef int (*regexp_matcher)(String*, int, const byte*,
20 const byte*, int*, int, Address, int, Isolate*); 20 const byte*, int*, int, Address, int, Isolate*);
21 21
22 // Call the generated regexp code directly. The code at the entry address should 22 // Call the generated regexp code directly. The code at the entry address should
23 // expect eight int/pointer sized arguments and return an int. 23 // expect eight int/pointer sized arguments and return an int.
24 #define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7, p8) \ 24 #define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7, p8) \
25 (FUNCTION_CAST<regexp_matcher>(entry)(p0, p1, p2, p3, p4, p5, p6, p7, p8)) 25 (FUNCTION_CAST<regexp_matcher>(entry)(p0, p1, p2, p3, p4, p5, p6, p7, p8))
26 26
27 27
28 #define TRY_CATCH_FROM_ADDRESS(try_catch_address) \
29 (reinterpret_cast<TryCatch*>(try_catch_address))
30
31 // The stack limit beyond which we will throw stack overflow errors in 28 // The stack limit beyond which we will throw stack overflow errors in
32 // generated code. Because generated code on ia32 uses the C stack, we 29 // generated code. Because generated code on ia32 uses the C stack, we
33 // just use the C stack limit. 30 // just use the C stack limit.
34 class SimulatorStack : public v8::internal::AllStatic { 31 class SimulatorStack : public v8::internal::AllStatic {
35 public: 32 public:
36 static inline uintptr_t JsLimitFromCLimit(Isolate* isolate, 33 static inline uintptr_t JsLimitFromCLimit(Isolate* isolate,
37 uintptr_t c_limit) { 34 uintptr_t c_limit) {
38 USE(isolate); 35 USE(isolate);
39 return c_limit; 36 return c_limit;
40 } 37 }
41 38
42 static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) { 39 static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) {
43 return try_catch_address; 40 return try_catch_address;
44 } 41 }
45 42
46 static inline void UnregisterCTryCatch() { } 43 static inline void UnregisterCTryCatch() { }
47 }; 44 };
48 45
49 } } // namespace v8::internal 46 } } // namespace v8::internal
50 47
51 #endif // V8_IA32_SIMULATOR_IA32_H_ 48 #endif // V8_IA32_SIMULATOR_IA32_H_
OLDNEW
« no previous file with comments | « src/base/macros.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698