| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 8112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8123 static Object* Runtime_IS_VAR(Arguments args) { | 8123 static Object* Runtime_IS_VAR(Arguments args) { |
| 8124 UNREACHABLE(); // implemented as macro in the parser | 8124 UNREACHABLE(); // implemented as macro in the parser |
| 8125 return NULL; | 8125 return NULL; |
| 8126 } | 8126 } |
| 8127 | 8127 |
| 8128 | 8128 |
| 8129 // ---------------------------------------------------------------------------- | 8129 // ---------------------------------------------------------------------------- |
| 8130 // Implementation of Runtime | 8130 // Implementation of Runtime |
| 8131 | 8131 |
| 8132 #define F(name, nargs, ressize) \ | 8132 #define F(name, nargs, ressize) \ |
| 8133 { #name, "RuntimeStub_" #name, FUNCTION_ADDR(Runtime_##name), nargs, \ | 8133 { #name, FUNCTION_ADDR(Runtime_##name), nargs, \ |
| 8134 static_cast<int>(Runtime::k##name), ressize }, | 8134 static_cast<int>(Runtime::k##name), ressize }, |
| 8135 | 8135 |
| 8136 static Runtime::Function Runtime_functions[] = { | 8136 static Runtime::Function Runtime_functions[] = { |
| 8137 RUNTIME_FUNCTION_LIST(F) | 8137 RUNTIME_FUNCTION_LIST(F) |
| 8138 { NULL, NULL, NULL, 0, -1, 0 } | 8138 { NULL, NULL, 0, -1, 0 } |
| 8139 }; | 8139 }; |
| 8140 | 8140 |
| 8141 #undef F | 8141 #undef F |
| 8142 | 8142 |
| 8143 | 8143 |
| 8144 Runtime::Function* Runtime::FunctionForId(FunctionId fid) { | 8144 Runtime::Function* Runtime::FunctionForId(FunctionId fid) { |
| 8145 ASSERT(0 <= fid && fid < kNofFunctions); | 8145 ASSERT(0 <= fid && fid < kNofFunctions); |
| 8146 return &Runtime_functions[fid]; | 8146 return &Runtime_functions[fid]; |
| 8147 } | 8147 } |
| 8148 | 8148 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 8166 } else { | 8166 } else { |
| 8167 // Handle last resort GC and make sure to allow future allocations | 8167 // Handle last resort GC and make sure to allow future allocations |
| 8168 // to grow the heap without causing GCs (if possible). | 8168 // to grow the heap without causing GCs (if possible). |
| 8169 Counters::gc_last_resort_from_js.Increment(); | 8169 Counters::gc_last_resort_from_js.Increment(); |
| 8170 Heap::CollectAllGarbage(false); | 8170 Heap::CollectAllGarbage(false); |
| 8171 } | 8171 } |
| 8172 } | 8172 } |
| 8173 | 8173 |
| 8174 | 8174 |
| 8175 } } // namespace v8::internal | 8175 } } // namespace v8::internal |
| OLD | NEW |