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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 private: | 93 private: |
94 bool allow_natives_syntax_; | 94 bool allow_natives_syntax_; |
95 bool use_inlining_; | 95 bool use_inlining_; |
96 }; | 96 }; |
97 | 97 |
98 | 98 |
99 // Abort any ongoing incremental marking to make sure that all weak global | 99 // Abort any ongoing incremental marking to make sure that all weak global |
100 // handle callbacks are processed. | 100 // handle callbacks are processed. |
101 static void NonIncrementalGC(i::Isolate* isolate) { | 101 static void NonIncrementalGC(i::Isolate* isolate) { |
102 isolate->heap()->CollectAllGarbage(); | 102 isolate->heap()->CollectAllGarbage(i::Heap::kAbortIncrementalMarkingMask); |
103 } | 103 } |
104 | 104 |
105 | 105 |
106 static Handle<JSFunction> GetJSFunction(v8::Handle<v8::Object> obj, | 106 static Handle<JSFunction> GetJSFunction(v8::Handle<v8::Object> obj, |
107 const char* property_name) { | 107 const char* property_name) { |
108 v8::Local<v8::Function> fun = | 108 v8::Local<v8::Function> fun = |
109 v8::Local<v8::Function>::Cast(obj->Get(v8_str(property_name))); | 109 v8::Local<v8::Function>::Cast(obj->Get(v8_str(property_name))); |
110 return v8::Utils::OpenHandle(*fun); | 110 return v8::Utils::OpenHandle(*fun); |
111 } | 111 } |
112 | 112 |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized()); | 782 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized()); |
783 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized()); | 783 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized()); |
784 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized()); | 784 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized()); |
785 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized()); | 785 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized()); |
786 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value()); | 786 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value()); |
787 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value()); | 787 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value()); |
788 } | 788 } |
789 isolate->Exit(); | 789 isolate->Exit(); |
790 isolate->Dispose(); | 790 isolate->Dispose(); |
791 } | 791 } |
OLD | NEW |