| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 27 matching lines...) Expand all Loading... |
| 38 #include "src/compiler.h" | 38 #include "src/compiler.h" |
| 39 #include "src/scanner-character-streams.h" | 39 #include "src/scanner-character-streams.h" |
| 40 #include "tools/shell-utils.h" | 40 #include "tools/shell-utils.h" |
| 41 #include "src/parser.h" | 41 #include "src/parser.h" |
| 42 #include "src/preparse-data-format.h" | 42 #include "src/preparse-data-format.h" |
| 43 #include "src/preparse-data.h" | 43 #include "src/preparse-data.h" |
| 44 #include "src/preparser.h" | 44 #include "src/preparser.h" |
| 45 | 45 |
| 46 using namespace v8::internal; | 46 using namespace v8::internal; |
| 47 | 47 |
| 48 class StringResource8 : public v8::String::ExternalAsciiStringResource { | 48 class StringResource8 : public v8::String::ExternalOneByteStringResource { |
| 49 public: | 49 public: |
| 50 StringResource8(const char* data, int length) | 50 StringResource8(const char* data, int length) |
| 51 : data_(data), length_(length) { } | 51 : data_(data), length_(length) { } |
| 52 virtual size_t length() const { return length_; } | 52 virtual size_t length() const { return length_; } |
| 53 virtual const char* data() const { return data_; } | 53 virtual const char* data() const { return data_; } |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 const char* data_; | 56 const char* data_; |
| 57 int length_; | 57 int length_; |
| 58 }; | 58 }; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 first_parse_total); | 170 first_parse_total); |
| 171 printf("%s(SecondParseRunTime): %.f ms\n", benchmark.c_str(), | 171 printf("%s(SecondParseRunTime): %.f ms\n", benchmark.c_str(), |
| 172 second_parse_total); | 172 second_parse_total); |
| 173 } | 173 } |
| 174 } | 174 } |
| 175 v8::V8::Dispose(); | 175 v8::V8::Dispose(); |
| 176 v8::V8::ShutdownPlatform(); | 176 v8::V8::ShutdownPlatform(); |
| 177 delete platform; | 177 delete platform; |
| 178 return 0; | 178 return 0; |
| 179 } | 179 } |
| OLD | NEW |