| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 Code::Flags flags, | 104 Code::Flags flags, |
| 105 CompilationInfo* info) { | 105 CompilationInfo* info) { |
| 106 Isolate* isolate = info->isolate(); | 106 Isolate* isolate = info->isolate(); |
| 107 | 107 |
| 108 // Allocate and install the code. | 108 // Allocate and install the code. |
| 109 CodeDesc desc; | 109 CodeDesc desc; |
| 110 bool is_crankshafted = | 110 bool is_crankshafted = |
| 111 Code::ExtractKindFromFlags(flags) == Code::OPTIMIZED_FUNCTION || | 111 Code::ExtractKindFromFlags(flags) == Code::OPTIMIZED_FUNCTION || |
| 112 info->IsStub(); | 112 info->IsStub(); |
| 113 masm->GetCode(&desc); | 113 masm->GetCode(&desc); |
| 114 AllowDeferredHandleDereference allow_deferred_handle_dereference; |
| 114 Handle<Code> code = | 115 Handle<Code> code = |
| 115 isolate->factory()->NewCode(desc, flags, masm->CodeObject(), | 116 isolate->factory()->NewCode(desc, flags, masm->CodeObject(), |
| 116 false, is_crankshafted, | 117 false, is_crankshafted, |
| 117 info->prologue_offset()); | 118 info->prologue_offset()); |
| 118 isolate->counters()->total_compiled_code_size()->Increment( | 119 isolate->counters()->total_compiled_code_size()->Increment( |
| 119 code->instruction_size()); | 120 code->instruction_size()); |
| 120 isolate->heap()->IncrementCodeGeneratedBytes(is_crankshafted, | 121 isolate->heap()->IncrementCodeGeneratedBytes(is_crankshafted, |
| 121 code->instruction_size()); | 122 code->instruction_size()); |
| 122 return code; | 123 return code; |
| 123 } | 124 } |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 ASSERT(result_size_ == 1 || result_size_ == 2); | 239 ASSERT(result_size_ == 1 || result_size_ == 2); |
| 239 #ifdef _WIN64 | 240 #ifdef _WIN64 |
| 240 return result | ((result_size_ == 1) ? 0 : 2); | 241 return result | ((result_size_ == 1) ? 0 : 2); |
| 241 #else | 242 #else |
| 242 return result; | 243 return result; |
| 243 #endif | 244 #endif |
| 244 } | 245 } |
| 245 | 246 |
| 246 | 247 |
| 247 } } // namespace v8::internal | 248 } } // namespace v8::internal |
| OLD | NEW |