| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
| 8 | 8 |
| 9 #include "src/ast-numbering.h" | 9 #include "src/ast-numbering.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "src/scopeinfo.h" | 27 #include "src/scopeinfo.h" |
| 28 #include "src/scopes.h" | 28 #include "src/scopes.h" |
| 29 #include "src/typing.h" | 29 #include "src/typing.h" |
| 30 #include "src/vm-state-inl.h" | 30 #include "src/vm-state-inl.h" |
| 31 | 31 |
| 32 namespace v8 { | 32 namespace v8 { |
| 33 namespace internal { | 33 namespace internal { |
| 34 | 34 |
| 35 | 35 |
| 36 ScriptData::ScriptData(const byte* data, int length) | 36 ScriptData::ScriptData(const byte* data, int length) |
| 37 : owns_data_(false), rejected_(false), data_(data), length_(length) { | 37 : owns_data_(false), data_(data), length_(length) { |
| 38 if (!IsAligned(reinterpret_cast<intptr_t>(data), kPointerAlignment)) { | 38 if (!IsAligned(reinterpret_cast<intptr_t>(data), kPointerAlignment)) { |
| 39 byte* copy = NewArray<byte>(length); | 39 byte* copy = NewArray<byte>(length); |
| 40 DCHECK(IsAligned(reinterpret_cast<intptr_t>(copy), kPointerAlignment)); | 40 DCHECK(IsAligned(reinterpret_cast<intptr_t>(copy), kPointerAlignment)); |
| 41 CopyBytes(copy, data, length); | 41 CopyBytes(copy, data, length); |
| 42 data_ = copy; | 42 data_ = copy; |
| 43 AcquireDataOwnership(); | 43 AcquireDataOwnership(); |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 | 46 |
| 47 | 47 |
| (...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1481 AllowHandleDereference allow_deref; | 1481 AllowHandleDereference allow_deref; |
| 1482 bool tracing_on = info()->IsStub() | 1482 bool tracing_on = info()->IsStub() |
| 1483 ? FLAG_trace_hydrogen_stubs | 1483 ? FLAG_trace_hydrogen_stubs |
| 1484 : (FLAG_trace_hydrogen && | 1484 : (FLAG_trace_hydrogen && |
| 1485 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1485 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); |
| 1486 return (tracing_on && | 1486 return (tracing_on && |
| 1487 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1487 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); |
| 1488 } | 1488 } |
| 1489 | 1489 |
| 1490 } } // namespace v8::internal | 1490 } } // namespace v8::internal |
| OLD | NEW |