OLD | NEW |
1 // Copyright 2007-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2007-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 20 matching lines...) Expand all Loading... |
31 | 31 |
32 #include "api.h" | 32 #include "api.h" |
33 #include "compilation-cache.h" | 33 #include "compilation-cache.h" |
34 #include "execution.h" | 34 #include "execution.h" |
35 #include "snapshot.h" | 35 #include "snapshot.h" |
36 #include "platform.h" | 36 #include "platform.h" |
37 #include "top.h" | 37 #include "top.h" |
38 #include "utils.h" | 38 #include "utils.h" |
39 #include "cctest.h" | 39 #include "cctest.h" |
40 #include "parser.h" | 40 #include "parser.h" |
| 41 #include "unicode-inl.h" |
41 | 42 |
42 static const bool kLogThreading = true; | 43 static const bool kLogThreading = true; |
43 | 44 |
44 static bool IsNaN(double x) { | 45 static bool IsNaN(double x) { |
45 #ifdef WIN32 | 46 #ifdef WIN32 |
46 return _isnan(x); | 47 return _isnan(x); |
47 #else | 48 #else |
48 return isnan(x); | 49 return isnan(x); |
49 #endif | 50 #endif |
50 } | 51 } |
(...skipping 11713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11764 v8::Context::Scope context_scope(context.local()); | 11765 v8::Context::Scope context_scope(context.local()); |
11765 | 11766 |
11766 v8::Handle<v8::ObjectTemplate> tmpl = v8::ObjectTemplate::New(); | 11767 v8::Handle<v8::ObjectTemplate> tmpl = v8::ObjectTemplate::New(); |
11767 tmpl->SetNamedPropertyHandler(Getter, NULL, NULL, NULL, Enumerator); | 11768 tmpl->SetNamedPropertyHandler(Getter, NULL, NULL, NULL, Enumerator); |
11768 context->Global()->Set(v8_str("o"), tmpl->NewInstance()); | 11769 context->Global()->Set(v8_str("o"), tmpl->NewInstance()); |
11769 v8::Handle<v8::Array> result = v8::Handle<v8::Array>::Cast(CompileRun( | 11770 v8::Handle<v8::Array> result = v8::Handle<v8::Array>::Cast(CompileRun( |
11770 "var result = []; for (var k in o) result.push(k); result")); | 11771 "var result = []; for (var k in o) result.push(k); result")); |
11771 CHECK_EQ(1, result->Length()); | 11772 CHECK_EQ(1, result->Length()); |
11772 CHECK_EQ(v8_str("universalAnswer"), result->Get(0)); | 11773 CHECK_EQ(v8_str("universalAnswer"), result->Get(0)); |
11773 } | 11774 } |
OLD | NEW |