Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/factory.h" | 5 #include "src/factory.h" |
| 6 | 6 |
| 7 #include "src/allocation-site-scopes.h" | 7 #include "src/allocation-site-scopes.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
| (...skipping 2256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2267 Handle<String> js_string = NewStringFromAsciiChecked(str, TENURED); | 2267 Handle<String> js_string = NewStringFromAsciiChecked(str, TENURED); |
| 2268 SetNumberStringCache(number, js_string); | 2268 SetNumberStringCache(number, js_string); |
| 2269 return js_string; | 2269 return js_string; |
| 2270 } | 2270 } |
| 2271 | 2271 |
| 2272 | 2272 |
| 2273 Handle<DebugInfo> Factory::NewDebugInfo(Handle<SharedFunctionInfo> shared) { | 2273 Handle<DebugInfo> Factory::NewDebugInfo(Handle<SharedFunctionInfo> shared) { |
| 2274 // Get the original code of the function. | 2274 // Get the original code of the function. |
| 2275 Handle<Code> code(shared->code()); | 2275 Handle<Code> code(shared->code()); |
| 2276 | 2276 |
| 2277 DCHECK(code->has_debug_break_slots()); | |
|
adamk
2015/06/16 16:04:28
Is this a stray from some other patch?
| |
| 2278 | |
| 2279 // Create a copy of the code before allocating the debug info object to avoid | 2277 // Create a copy of the code before allocating the debug info object to avoid |
| 2280 // allocation while setting up the debug info object. | 2278 // allocation while setting up the debug info object. |
| 2281 Handle<Code> original_code(*Factory::CopyCode(code)); | 2279 Handle<Code> original_code(*Factory::CopyCode(code)); |
| 2282 | 2280 |
| 2283 // Allocate initial fixed array for active break points before allocating the | 2281 // Allocate initial fixed array for active break points before allocating the |
| 2284 // debug info object to avoid allocation while setting up the debug info | 2282 // debug info object to avoid allocation while setting up the debug info |
| 2285 // object. | 2283 // object. |
| 2286 Handle<FixedArray> break_points( | 2284 Handle<FixedArray> break_points( |
| 2287 NewFixedArray(DebugInfo::kEstimatedNofBreakPointsInFunction)); | 2285 NewFixedArray(DebugInfo::kEstimatedNofBreakPointsInFunction)); |
| 2288 | 2286 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2431 } | 2429 } |
| 2432 | 2430 |
| 2433 | 2431 |
| 2434 Handle<Object> Factory::ToBoolean(bool value) { | 2432 Handle<Object> Factory::ToBoolean(bool value) { |
| 2435 return value ? true_value() : false_value(); | 2433 return value ? true_value() : false_value(); |
| 2436 } | 2434 } |
| 2437 | 2435 |
| 2438 | 2436 |
| 2439 } // namespace internal | 2437 } // namespace internal |
| 2440 } // namespace v8 | 2438 } // namespace v8 |
| OLD | NEW |