OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 // parsing statistics. | 385 // parsing statistics. |
386 HistogramTimer* rate = info->is_eval() | 386 HistogramTimer* rate = info->is_eval() |
387 ? info->isolate()->counters()->compile_eval() | 387 ? info->isolate()->counters()->compile_eval() |
388 : info->isolate()->counters()->compile(); | 388 : info->isolate()->counters()->compile(); |
389 HistogramTimerScope timer(rate); | 389 HistogramTimerScope timer(rate); |
390 | 390 |
391 // Compile the code. | 391 // Compile the code. |
392 FunctionLiteral* lit = info->function(); | 392 FunctionLiteral* lit = info->function(); |
393 LiveEditFunctionTracker live_edit_tracker(isolate, lit); | 393 LiveEditFunctionTracker live_edit_tracker(isolate, lit); |
394 if (!MakeCode(info)) { | 394 if (!MakeCode(info)) { |
395 isolate->StackOverflow(); | 395 if (!isolate->has_pending_exception()) isolate->StackOverflow(); |
396 return Handle<SharedFunctionInfo>::null(); | 396 return Handle<SharedFunctionInfo>::null(); |
397 } | 397 } |
398 | 398 |
399 // Allocate function. | 399 // Allocate function. |
400 ASSERT(!info->code().is_null()); | 400 ASSERT(!info->code().is_null()); |
401 Handle<SharedFunctionInfo> result = | 401 Handle<SharedFunctionInfo> result = |
402 isolate->factory()->NewSharedFunctionInfo( | 402 isolate->factory()->NewSharedFunctionInfo( |
403 lit->name(), | 403 lit->name(), |
404 lit->materialized_literal_count(), | 404 lit->materialized_literal_count(), |
405 info->code(), | 405 info->code(), |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 } | 797 } |
798 } | 798 } |
799 | 799 |
800 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 800 GDBJIT(AddCode(Handle<String>(shared->DebugName()), |
801 Handle<Script>(info->script()), | 801 Handle<Script>(info->script()), |
802 Handle<Code>(info->code()), | 802 Handle<Code>(info->code()), |
803 info)); | 803 info)); |
804 } | 804 } |
805 | 805 |
806 } } // namespace v8::internal | 806 } } // namespace v8::internal |
OLD | NEW |