| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 int len = String::cast(script->source())->length(); | 241 int len = String::cast(script->source())->length(); |
| 242 Counters::total_old_codegen_source_size.Increment(len); | 242 Counters::total_old_codegen_source_size.Increment(len); |
| 243 } | 243 } |
| 244 MakeCodePrologue(info); | 244 MakeCodePrologue(info); |
| 245 // Generate code. | 245 // Generate code. |
| 246 const int kInitialBufferSize = 4 * KB; | 246 const int kInitialBufferSize = 4 * KB; |
| 247 MacroAssembler masm(NULL, kInitialBufferSize); | 247 MacroAssembler masm(NULL, kInitialBufferSize); |
| 248 CodeGenerator cgen(&masm); | 248 CodeGenerator cgen(&masm); |
| 249 CodeGeneratorScope scope(&cgen); | 249 CodeGeneratorScope scope(&cgen); |
| 250 live_edit_tracker.RecordFunctionScope(info->function()->scope()); | 250 live_edit_tracker.RecordFunctionScope(info->function()->scope()); |
| 251 cgen.Generate(info, PRIMARY); | 251 cgen.Generate(info); |
| 252 if (cgen.HasStackOverflow()) { | 252 if (cgen.HasStackOverflow()) { |
| 253 ASSERT(!Top::has_pending_exception()); | 253 ASSERT(!Top::has_pending_exception()); |
| 254 return Handle<Code>::null(); | 254 return Handle<Code>::null(); |
| 255 } | 255 } |
| 256 | 256 |
| 257 InLoopFlag in_loop = (cgen.loop_nesting() != 0) ? IN_LOOP : NOT_IN_LOOP; | 257 InLoopFlag in_loop = (cgen.loop_nesting() != 0) ? IN_LOOP : NOT_IN_LOOP; |
| 258 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, in_loop); | 258 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, in_loop); |
| 259 Handle<Code> result = MakeCodeEpilogue(cgen.masm(), flags, info); | 259 Handle<Code> result = MakeCodeEpilogue(cgen.masm(), flags, info); |
| 260 live_edit_tracker.RecordFunctionCode(result); | 260 live_edit_tracker.RecordFunctionCode(result); |
| 261 return result; | 261 return result; |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 } | 524 } |
| 525 } | 525 } |
| 526 | 526 |
| 527 | 527 |
| 528 void ApiGetterEntryStub::SetCustomCache(Code* value) { | 528 void ApiGetterEntryStub::SetCustomCache(Code* value) { |
| 529 info()->set_load_stub_cache(value); | 529 info()->set_load_stub_cache(value); |
| 530 } | 530 } |
| 531 | 531 |
| 532 | 532 |
| 533 } } // namespace v8::internal | 533 } } // namespace v8::internal |
| OLD | NEW |