Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: runtime/vm/kernel_to_il.cc

Issue 2681683005: [dart:io] Adds functions to set file access and modification time (Closed)
Patch Set: Update changelog Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/bin/io_service_no_ssl.h ('k') | sdk/lib/_internal/js_runtime/lib/io_patch.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <map> 5 #include <map>
6 #include <set> 6 #include <set>
7 #include <string> 7 #include <string>
8 8
9 #include "vm/kernel_to_il.h" 9 #include "vm/kernel_to_il.h"
10 10
(...skipping 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after
1804 } 1804 }
1805 } 1805 }
1806 1806
1807 1807
1808 void ConstantEvaluator::VisitNot(Not* node) { 1808 void ConstantEvaluator::VisitNot(Not* node) {
1809 result_ ^= Bool::Get(!EvaluateBooleanExpression(node->expression())).raw(); 1809 result_ ^= Bool::Get(!EvaluateBooleanExpression(node->expression())).raw();
1810 } 1810 }
1811 1811
1812 1812
1813 void ConstantEvaluator::VisitPropertyGet(PropertyGet* node) { 1813 void ConstantEvaluator::VisitPropertyGet(PropertyGet* node) {
1814 const size_t kLengthLen = strlen("length"); 1814 const intptr_t kLengthLen = strlen("length");
1815 1815
1816 String* string = node->name()->string(); 1816 String* string = node->name()->string();
1817 if (string->size() == kLengthLen && 1817 if ((string->size() == kLengthLen) &&
1818 memcmp(string->buffer(), "length", kLengthLen) == 0) { 1818 (memcmp(string->buffer(), "length", kLengthLen) == 0)) {
1819 node->receiver()->AcceptExpressionVisitor(this); 1819 node->receiver()->AcceptExpressionVisitor(this);
1820 if (result_.IsString()) { 1820 if (result_.IsString()) {
1821 const dart::String& str = 1821 const dart::String& str =
1822 dart::String::Handle(Z, dart::String::RawCast(result_.raw())); 1822 dart::String::Handle(Z, dart::String::RawCast(result_.raw()));
1823 result_ = Integer::New(str.Length()); 1823 result_ = Integer::New(str.Length());
1824 } else { 1824 } else {
1825 H.ReportError( 1825 H.ReportError(
1826 "Constant expressions can only call " 1826 "Constant expressions can only call "
1827 "'length' on string constants."); 1827 "'length' on string constants.");
1828 } 1828 }
(...skipping 4451 matching lines...) Expand 10 before | Expand all | Expand 10 after
6280 thread->clear_sticky_error(); 6280 thread->clear_sticky_error();
6281 return error.raw(); 6281 return error.raw();
6282 } 6282 }
6283 } 6283 }
6284 6284
6285 6285
6286 } // namespace kernel 6286 } // namespace kernel
6287 } // namespace dart 6287 } // namespace dart
6288 6288
6289 #endif // !defined(DART_PRECOMPILED_RUNTIME) 6289 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« no previous file with comments | « runtime/bin/io_service_no_ssl.h ('k') | sdk/lib/_internal/js_runtime/lib/io_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698