| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 5055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5066 DeleteArray(args().start()); | 5066 DeleteArray(args().start()); |
| 5067 } | 5067 } |
| 5068 | 5068 |
| 5069 | 5069 |
| 5070 ScriptDataImpl::~ScriptDataImpl() { | 5070 ScriptDataImpl::~ScriptDataImpl() { |
| 5071 store_.Dispose(); | 5071 store_.Dispose(); |
| 5072 } | 5072 } |
| 5073 | 5073 |
| 5074 | 5074 |
| 5075 int ScriptDataImpl::Length() { | 5075 int ScriptDataImpl::Length() { |
| 5076 static const int kCharToUnsignedFactor = sizeof(unsigned) / sizeof(char); | 5076 return store_.length() * sizeof(unsigned); |
| 5077 return store_.length() * kCharToUnsignedFactor; | |
| 5078 } | 5077 } |
| 5079 | 5078 |
| 5080 | 5079 |
| 5081 const char* ScriptDataImpl::Data() { | 5080 const char* ScriptDataImpl::Data() { |
| 5082 return reinterpret_cast<const char*>(store_.start()); | 5081 return reinterpret_cast<const char*>(store_.start()); |
| 5083 } | 5082 } |
| 5084 | 5083 |
| 5085 | 5084 |
| 5086 bool ScriptDataImpl::HasError() { | 5085 bool ScriptDataImpl::HasError() { |
| 5087 return has_error(); | 5086 return has_error(); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5177 parser.ParseLazy(script_source, name, | 5176 parser.ParseLazy(script_source, name, |
| 5178 start_position, end_position, is_expression); | 5177 start_position, end_position, is_expression); |
| 5179 return result; | 5178 return result; |
| 5180 } | 5179 } |
| 5181 | 5180 |
| 5182 | 5181 |
| 5183 #undef NEW | 5182 #undef NEW |
| 5184 | 5183 |
| 5185 | 5184 |
| 5186 } } // namespace v8::internal | 5185 } } // namespace v8::internal |
| OLD | NEW |