| 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 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2242 // object. | 2242 // object. |
| 2243 Handle<FixedArray> break_points( | 2243 Handle<FixedArray> break_points( |
| 2244 NewFixedArray(DebugInfo::kEstimatedNofBreakPointsInFunction)); | 2244 NewFixedArray(DebugInfo::kEstimatedNofBreakPointsInFunction)); |
| 2245 | 2245 |
| 2246 // Create and set up the debug info object. Debug info contains function, a | 2246 // Create and set up the debug info object. Debug info contains function, a |
| 2247 // copy of the original code, the executing code and initial fixed array for | 2247 // copy of the original code, the executing code and initial fixed array for |
| 2248 // active break points. | 2248 // active break points. |
| 2249 Handle<DebugInfo> debug_info = | 2249 Handle<DebugInfo> debug_info = |
| 2250 Handle<DebugInfo>::cast(NewStruct(DEBUG_INFO_TYPE)); | 2250 Handle<DebugInfo>::cast(NewStruct(DEBUG_INFO_TYPE)); |
| 2251 debug_info->set_shared(*shared); | 2251 debug_info->set_shared(*shared); |
| 2252 debug_info->set_code(shared->code()); | 2252 if (shared->HasBytecodeArray()) { |
| 2253 debug_info->set_abstract_code(AbstractCode::cast(shared->bytecode_array())); |
| 2254 } else { |
| 2255 debug_info->set_abstract_code(AbstractCode::cast(shared->code())); |
| 2256 } |
| 2253 debug_info->set_break_points(*break_points); | 2257 debug_info->set_break_points(*break_points); |
| 2254 | 2258 |
| 2255 // Link debug info to function. | 2259 // Link debug info to function. |
| 2256 shared->set_debug_info(*debug_info); | 2260 shared->set_debug_info(*debug_info); |
| 2257 | 2261 |
| 2258 return debug_info; | 2262 return debug_info; |
| 2259 } | 2263 } |
| 2260 | 2264 |
| 2261 | 2265 |
| 2262 Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee, | 2266 Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee, |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2386 } | 2390 } |
| 2387 | 2391 |
| 2388 | 2392 |
| 2389 Handle<Object> Factory::ToBoolean(bool value) { | 2393 Handle<Object> Factory::ToBoolean(bool value) { |
| 2390 return value ? true_value() : false_value(); | 2394 return value ? true_value() : false_value(); |
| 2391 } | 2395 } |
| 2392 | 2396 |
| 2393 | 2397 |
| 2394 } // namespace internal | 2398 } // namespace internal |
| 2395 } // namespace v8 | 2399 } // namespace v8 |
| OLD | NEW |