| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 21 matching lines...) Expand all Loading... |
| 32 #include "bootstrapper.h" | 32 #include "bootstrapper.h" |
| 33 #include "compiler.h" | 33 #include "compiler.h" |
| 34 #include "debug.h" | 34 #include "debug.h" |
| 35 #include "execution.h" | 35 #include "execution.h" |
| 36 #include "global-handles.h" | 36 #include "global-handles.h" |
| 37 #include "natives.h" | 37 #include "natives.h" |
| 38 #include "runtime.h" | 38 #include "runtime.h" |
| 39 | 39 |
| 40 namespace v8 { namespace internal { | 40 namespace v8 { namespace internal { |
| 41 | 41 |
| 42 DECLARE_bool(allow_natives_syntax); | |
| 43 | |
| 44 #ifdef DEBUG | |
| 45 DECLARE_bool(gc_greedy); | |
| 46 #endif | |
| 47 | |
| 48 #define CALL_GC(RESULT) \ | 42 #define CALL_GC(RESULT) \ |
| 49 { \ | 43 { \ |
| 50 Failure* __failure__ = Failure::cast(RESULT); \ | 44 Failure* __failure__ = Failure::cast(RESULT); \ |
| 51 if (!Heap::CollectGarbage(__failure__->requested(), \ | 45 if (!Heap::CollectGarbage(__failure__->requested(), \ |
| 52 __failure__->allocation_space())) { \ | 46 __failure__->allocation_space())) { \ |
| 53 /* TODO(1181417): Fix this. */ \ | 47 /* TODO(1181417): Fix this. */ \ |
| 54 V8::FatalProcessOutOfMemory("Handles"); \ | 48 V8::FatalProcessOutOfMemory("Handles"); \ |
| 55 } \ | 49 } \ |
| 56 } | 50 } |
| 57 | 51 |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 Handle<Context> security_context) { | 542 Handle<Context> security_context) { |
| 549 Handle<FixedArray> arr = Factory::NewFixedArray(4); | 543 Handle<FixedArray> arr = Factory::NewFixedArray(4); |
| 550 arr->set(0, Smi::FromInt(index)); | 544 arr->set(0, Smi::FromInt(index)); |
| 551 arr->set(1, *compile_context); // Compile in this context | 545 arr->set(1, *compile_context); // Compile in this context |
| 552 arr->set(2, *function_context); // Set function context to this | 546 arr->set(2, *function_context); // Set function context to this |
| 553 arr->set(3, *security_context); // Receiver for call | 547 arr->set(3, *security_context); // Receiver for call |
| 554 fun->shared()->set_lazy_load_data(*arr); | 548 fun->shared()->set_lazy_load_data(*arr); |
| 555 } | 549 } |
| 556 | 550 |
| 557 } } // namespace v8::internal | 551 } } // namespace v8::internal |
| OLD | NEW |